重构: App拆分10域文件+并发安全+结构化日志+依赖升级

This commit is contained in:
lxy
2026-05-16 20:45:14 +08:00
parent d17c20c579
commit 767311fc04
27 changed files with 1457 additions and 1218 deletions
+7 -2
View File
@@ -617,13 +617,18 @@ func (s *Service) RenamePath(connID string, oldPath string, newPath string) (*fi
if err := c.Copy(ctx, f.Key, newPrefix+relativeKey); err != nil {
return nil, fmt.Errorf("复制失败: %w", err)
}
c.Delete(ctx, f.Key)
if err := c.Delete(ctx, f.Key); err != nil {
return nil, fmt.Errorf("删除源文件失败: %w", err)
}
}
if !listResult.IsTruncated {
break
}
}
c.Delete(ctx, oldKey) // marker
if err := c.Delete(ctx, oldKey); err != nil { // marker
// 目录标记删除失败不影响重命名结果
_ = err
}
} else {
if err := c.Copy(ctx, oldKey, newKey); err != nil {
return nil, fmt.Errorf("复制失败: %w", err)