mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 08:17:14 +08:00
fix: preserve file ownership when copying via file manager (#1335)
* Initial plan * fix: use cp -arf to preserve file ownership when copying Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
This commit is contained in:
@@ -49,9 +49,9 @@ func Mv(src, dst string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Cp 复制文件或目录
|
||||
// Cp 复制文件或目录(保留所有权和权限)
|
||||
func Cp(src, dst string) error {
|
||||
_, err := shell.Execf(`cp -rf '%s' '%s'`, src, dst)
|
||||
_, err := shell.Execf(`cp -arf '%s' '%s'`, src, dst)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user