mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve file copy
This commit is contained in:
parent
d12b39c3c2
commit
e93c62e49f
4 changed files with 13 additions and 7 deletions
|
|
@ -383,7 +383,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
return nil
|
||||
})
|
||||
|
||||
if err = filelock.RoboCopy(unzipRootPath, targetDir); nil != err {
|
||||
if err = filelock.Copy(unzipRootPath, targetDir); nil != err {
|
||||
logging.LogErrorf("copy data dir from [%s] to [%s] failed: %s", unzipRootPath, util.DataDir, err)
|
||||
err = errors.New("copy data failed")
|
||||
return
|
||||
|
|
@ -440,7 +440,7 @@ func ImportData(zipPath string) (err error) {
|
|||
}
|
||||
|
||||
tmpDataPath := filepath.Join(unzipPath, dirs[0].Name())
|
||||
if err = filelock.RoboCopy(tmpDataPath, util.DataDir); nil != err {
|
||||
if err = filelock.Copy(tmpDataPath, util.DataDir); nil != err {
|
||||
logging.LogErrorf("copy data dir from [%s] to [%s] failed: %s", tmpDataPath, util.DataDir, err)
|
||||
err = errors.New("copy data failed")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue