🐛 Unable to export Data if workspace folder contains non-ASCII characters Fix https://github.com/siyuan-note/siyuan/issues/8678

This commit is contained in:
Daniel 2023-07-04 20:19:26 +08:00
parent 943e155203
commit 164c679d89
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -255,6 +255,12 @@ func ExportDataInFolder(exportFolder string) (name string, err error) {
return
}
name = filepath.Base(zipPath)
name, err = url.PathUnescape(name)
if nil != err {
logging.LogErrorf("url unescape [%s] failed: %s", name, err)
return
}
targetZipPath := filepath.Join(exportFolder, name)
zipAbsPath := filepath.Join(util.TempDir, "export", name)
err = filelock.Copy(zipAbsPath, targetZipPath)