🎨 Export data.zip and then import it no longer change the file timestamp Fix https://github.com/siyuan-note/siyuan/issues/8540

This commit is contained in:
Daniel 2023-06-15 11:55:36 +08:00
parent 93916d94b1
commit 9841e0b481
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -82,6 +82,9 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
util.PushEndlessProgress(Conf.Language(73))
defer util.ClearPushProgress(100)
syncLock.Lock()
defer syncLock.Unlock()
baseName := filepath.Base(zipPath)
ext := filepath.Ext(baseName)
baseName = strings.TrimSuffix(baseName, ext)
@ -412,6 +415,9 @@ func ImportData(zipPath string) (err error) {
util.PushEndlessProgress(Conf.Language(73))
defer util.ClearPushProgress(100)
syncLock.Lock()
defer syncLock.Unlock()
baseName := filepath.Base(zipPath)
ext := filepath.Ext(baseName)
baseName = strings.TrimSuffix(baseName, ext)