diff --git a/kernel/model/import.go b/kernel/model/import.go index 410ed9896..a23869e1e 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -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)