chore(proto): change symlinktarget to be byte sequence (fixes #9913) (#9914)

This commit is contained in:
Jakob Borg
2025-01-11 17:38:29 +01:00
committed by GitHub
parent ab20c16982
commit 516f3e29e8
11 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -740,7 +740,7 @@ func CreateFileInfo(fi fs.FileInfo, name string, filesystem fs.Filesystem, scanO
if err != nil {
return protocol.FileInfo{}, err
}
f.SymlinkTarget = target
f.SymlinkTarget = []byte(target)
f.NoPermissions = true // Symlinks don't have permissions of their own
return f, nil
}
+1 -1
View File
@@ -367,7 +367,7 @@ func TestWalkSymlinkUnix(t *testing.T) {
if len(files[0].Blocks) != 0 {
t.Errorf("expected zero blocks for symlink, not %d", len(files[0].Blocks))
}
if files[0].SymlinkTarget != "../testdata" {
if string(files[0].SymlinkTarget) != "../testdata" {
t.Errorf("expected symlink to have target destination, not %q", files[0].SymlinkTarget)
}
}