mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 00:13:49 +01:00
Use os.Lstat instead of os.Stat so we ignore symlinks completely
This commit is contained in:
parent
c42bafc4e2
commit
5ebbe342b8
@ -152,7 +152,7 @@ func walk(root string) FsObjects {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to open directory: %s: %s", path, err)
|
log.Printf("Failed to open directory: %s: %s", path, err)
|
||||||
} else {
|
} else {
|
||||||
info, err := os.Stat(path)
|
info, err := os.Lstat(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Failed to stat %s: %s", path, err)
|
log.Printf("Failed to stat %s: %s", path, err)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user