Skip to content

Commit 2486a1b

Browse files
AymericDumurlock
authored andcommitted
rawx(Go): Improve error message when the volume XATTRs are wrong
1 parent f75880e commit 2486a1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rawx/filerepo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package main
1919
import (
2020
"bytes"
2121
"errors"
22+
"fmt"
2223
"os"
2324
"path/filepath"
2425
"strings"
@@ -459,7 +460,8 @@ func setOrHasXattr(path, key, value string) error {
459460
if bytes.Equal([]byte(value), buf[:sz]) {
460461
return nil
461462
}
462-
return errors.New("XATTR mismatch")
463+
return fmt.Errorf("XATTR '%s' of '%s' mismatches with '%s'",
464+
key, path, value)
463465
}
464466

465467
func xattrKey(name string) string {

0 commit comments

Comments
 (0)