mirror of
https://github.com/rclone/rclone
synced 2025-02-18 14:11:27 +01:00
sync: fix cpu spinning when empty directory finding with leading slashes
Before this change the logic which makes sure we create all directories could get confused with directories which started with slashes and get into an infinite loop consuming 100% of the CPU.
This commit is contained in:
parent
77429b154e
commit
c837664653
@ -726,7 +726,7 @@ func (s *syncCopyMove) markParentNotEmpty(entry fs.DirEntry) {
|
||||
parentDir = ""
|
||||
}
|
||||
delete(s.srcEmptyDirs, parentDir)
|
||||
if parentDir == "" {
|
||||
if parentDir == "" || parentDir == "/" {
|
||||
break
|
||||
}
|
||||
parentDir = path.Dir(parentDir)
|
||||
|
Loading…
Reference in New Issue
Block a user