Test: modified folder methods and filesystem

This commit is contained in:
HFO4
2019-12-08 10:57:43 +08:00
parent 05c802e0fa
commit 6eff13c80a
13 changed files with 135 additions and 51 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"errors"
"github.com/HFO4/cloudreve/pkg/util"
"path"
)
// Hook 钩子函数
@@ -118,10 +117,10 @@ func GenericAfterUpload(ctx context.Context, fs *FileSystem) error {
}
// 检查文件是否存在
if ok, _ := fs.IsFileExist(path.Join(
virtualPath,
if ok, _ := fs.IsChildFileExist(
folder,
ctx.Value(FileHeaderCtx).(FileHeader).GetFileName(),
)); ok {
); ok {
return ErrFileExisted
}