From 5ebbe342b85729799d8c3bd93aa25535b78c4472 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 28 Nov 2012 17:12:54 +0000 Subject: [PATCH] Use os.Lstat instead of os.Stat so we ignore symlinks completely --- swiftsync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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