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

Use os.Lstat instead of os.Stat so we ignore symlinks completely

Nick Craig-Wood5ebbe342b857
diff --git a/swiftsync.go b/swiftsync.go
index 03575081d..fb4d04d15 100644
--- a/swiftsync.go
+++ b/swiftsync.go
@@ -152,7 +152,7 @@ func walk(root string) FsObjects {
if err != nil {
log.Printf("Failed to open directory: %s: %s", path, err)
} else {
- info, err := os.Stat(path)
+ info, err := os.Lstat(path)
if err != nil {
log.Printf("Failed to stat %s: %s", path, err)
return nil