feat: add root prefix before operate

This commit is contained in:
Noah Hsu
2022-06-10 20:20:45 +08:00
parent 354dee67dc
commit cd7e9974df
9 changed files with 49 additions and 11 deletions

14
internal/fs/util.go Normal file
View File

@ -0,0 +1,14 @@
package fs
import (
"github.com/alist-org/alist/v3/internal/driver"
)
func containsByName(files []driver.FileInfo, file driver.FileInfo) bool {
for _, f := range files {
if f.GetName() == file.GetName() {
return true
}
}
return false
}