fix: Fix file copy overwrite error (#9796)

This commit is contained in:
2025-08-01 16:00:11 +08:00 committed by GitHub
parent fba46be47a
commit c45bb60b50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -417,6 +417,14 @@ func (f *FileService) MvFile(m request.FileMove) error {
global.LOG.Errorf("copy file [%s] to [%s] failed, err: %s", src, m.NewPath, err.Error())
}
}
if len(m.CoverPaths) > 0 {
for _, src := range m.CoverPaths {
if err := fo.CopyAndReName(src, m.NewPath, "", true); err != nil {
errs = append(errs, err)
global.LOG.Errorf("copy file [%s] to [%s] failed, err: %s", src, m.NewPath, err.Error())
}
}
}
}
var errString string