Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

local: fix TestRemoveThroughPlantedSymlinkBlocked failing on Windows

Nick Craig-Wood6a4b77208e2f
diff --git a/backend/local/local_internal_test.go b/backend/local/local_internal_test.go
index 680f8d3e3..d4b7cf78b 100644
--- a/backend/local/local_internal_test.go
+++ b/backend/local/local_internal_test.go
@@ -597,6 +597,12 @@ func TestMkdirMetadataThroughPlantedSymlinkBlocked(t *testing.T) {
// TestRemoveThroughPlantedSymlinkBlocked checks Remove and Rmdir can't
// delete anything outside the root through a planted symlink.
func TestRemoveThroughPlantedSymlinkBlocked(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ // os.Root.Symlink makes a file symlink to a directory outside
+ // the root, which Windows can't traverse, so the planted link
+ // can't reach the outside files.
+ t.Skip("planted directory symlinks can't be traversed on Windows")
+ }
skipIfNoSymlinks(t)
ctx := context.Background()