mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 15:36:45 +08:00
fix: Fix file copy overwrite error (#9796)
This commit is contained in:
parent
fba46be47a
commit
c45bb60b50
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue