Skip to content

Commit

Permalink
rawx(Go): Improve error message when the volume XATTRs are wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericDu authored and murlock committed Nov 10, 2020
1 parent f75880e commit 2486a1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rawx/filerepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"bytes"
"errors"
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -459,7 +460,8 @@ func setOrHasXattr(path, key, value string) error {
if bytes.Equal([]byte(value), buf[:sz]) {
return nil
}
return errors.New("XATTR mismatch")
return fmt.Errorf("XATTR '%s' of '%s' mismatches with '%s'",
key, path, value)
}

func xattrKey(name string) string {
Expand Down

0 comments on commit 2486a1b

Please # to comment.