fix(local): disable copying or moving to subfolders (close #2760)

This commit is contained in:
Noah Hsu
2022-12-20 16:27:04 +08:00
parent 146619134d
commit d756cf3e9f
3 changed files with 9 additions and 3 deletions

View File

@ -40,7 +40,7 @@ func PathEqual(path1, path2 string) bool {
func IsSubPath(path string, subPath string) bool {
path, subPath = FixAndCleanPath(path), FixAndCleanPath(subPath)
return path == subPath || strings.HasPrefix(path, PathAddSeparatorSuffix(subPath))
return path == subPath || strings.HasPrefix(subPath, PathAddSeparatorSuffix(path))
}
func Ext(path string) string {