mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Improve file copy
This commit is contained in:
parent
d12b39c3c2
commit
e93c62e49f
4 changed files with 13 additions and 7 deletions
|
|
@ -257,7 +257,7 @@ func ExportDataInFolder(exportFolder string) (name string, err error) {
|
|||
name = filepath.Base(zipPath)
|
||||
targetZipPath := filepath.Join(exportFolder, name)
|
||||
zipAbsPath := filepath.Join(util.TempDir, "export", name)
|
||||
err = filelock.RoboCopy(zipAbsPath, targetZipPath)
|
||||
err = filelock.Copy(zipAbsPath, targetZipPath)
|
||||
if nil != err {
|
||||
logging.LogErrorf("copy export zip from [%s] to [%s] failed: %s", zipAbsPath, targetZipPath, err)
|
||||
return
|
||||
|
|
@ -291,7 +291,7 @@ func exportData(exportFolder string) (zipPath string, err error) {
|
|||
}
|
||||
|
||||
data := filepath.Join(util.WorkspaceDir, "data")
|
||||
if err = filelock.RoboCopy(data, exportFolder); nil != err {
|
||||
if err = filelock.Copy(data, exportFolder); nil != err {
|
||||
logging.LogErrorf("copy data dir from [%s] to [%s] failed: %s", data, baseFolderName, err)
|
||||
err = errors.New(fmt.Sprintf(Conf.Language(14), err.Error()))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue