Feat: create hidden file when creating upload session

This commit is contained in:
HFO4
2022-02-27 14:04:30 +08:00
parent 868a88e5fc
commit e37e93a7b6
11 changed files with 69 additions and 74 deletions

View File

@@ -88,7 +88,7 @@ func (handler Driver) Put(ctx context.Context, file fsctx.FileHeader) error {
dst := util.RelativePath(filepath.FromSlash(file.GetSavePath()))
// 如果非 Overwrite则检查是否有重名冲突
if file.GetMode() != fsctx.Overwrite {
if file.GetMode() == fsctx.Create {
if util.Exists(dst) {
util.Log().Warning("物理同名文件已存在或不可用: %s", dst)
return errors.New("物理同名文件已存在或不可用")