Test: moveOrCopyFolder / File

This commit is contained in:
HFO4
2019-12-04 13:49:28 +08:00
parent 362a7c389d
commit 5d50e7ed1e
8 changed files with 460 additions and 6 deletions

View File

@@ -261,6 +261,11 @@ func (folder *Folder) MoveOrCopyFolderTo(dirs []string, dstFolder *Folder, isCop
index := 0
for len(toBeMoved) != 0 {
innerIndex := index % len(toBeMoved)
index++
// 限制循环次数
if index > 65535 {
return 0, errors.New("循环超出限制")
}
// 如果是顶级父目录,直接删除,不需要复制
if toBeMoved[innerIndex].PositionAbsolute == ignorePath {