mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Test: modified folder methods and filesystem
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user