mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 07:32:23 +08:00
♻️ 工作空间/incremental/
文件夹移动到 工作空间/temp/incremental/
Fix https://github.com/siyuan-note/siyuan/issues/5119
This commit is contained in:
parent
d3eb23c137
commit
3aced60e8c
@ -347,12 +347,12 @@ func setE2EEPasswd(c *gin.Context) {
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
if err := os.RemoveAll(filepath.Join(util.WorkspaceDir, "incremental")); nil != err {
|
||||
if err := os.RemoveAll(filepath.Join(util.TempDir, "incremental")); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
if err := os.MkdirAll(filepath.Join(util.WorkspaceDir, "incremental"), 0755); nil != err {
|
||||
if err := os.MkdirAll(filepath.Join(util.TempDir, "incremental"), 0755); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
|
@ -379,7 +379,7 @@ func UploadBackup() (err error) {
|
||||
var pathJSON = fmt.Sprintf("%x", md5.Sum([]byte("paths.json"))) // 6952277a5a37c17aa6a7c6d86cd507b1
|
||||
|
||||
func encryptDataDir(passwd string) (encryptedDataDir string, err error) {
|
||||
encryptedDataDir = filepath.Join(util.WorkspaceDir, "incremental", "backup-encrypt")
|
||||
encryptedDataDir = filepath.Join(util.TempDir, "incremental", "backup-encrypt")
|
||||
if err = os.RemoveAll(encryptedDataDir); nil != err {
|
||||
return
|
||||
}
|
||||
@ -511,7 +511,7 @@ func encryptDataDir(passwd string) (encryptedDataDir string, err error) {
|
||||
}
|
||||
|
||||
func decryptDataDir(passwd string) (decryptedDataDir string, err error) {
|
||||
decryptedDataDir = filepath.Join(util.WorkspaceDir, "incremental", "backup-decrypt")
|
||||
decryptedDataDir = filepath.Join(util.TempDir, "incremental", "backup-decrypt")
|
||||
if err = os.RemoveAll(decryptedDataDir); nil != err {
|
||||
return
|
||||
}
|
||||
|
@ -537,6 +537,7 @@ func clearWorkspaceTemp() {
|
||||
os.RemoveAll(filepath.Join(util.TempDir, "bazaar"))
|
||||
os.RemoveAll(filepath.Join(util.TempDir, "export"))
|
||||
os.RemoveAll(filepath.Join(util.TempDir, "import"))
|
||||
os.RemoveAll(filepath.Join(util.WorkspaceDir, "incremental")) // `工作空间/incremental/` 文件夹移动到 `工作空间/temp/incremental/` https://github.com/siyuan-note/siyuan/issues/5119
|
||||
|
||||
tmps, err := filepath.Glob(filepath.Join(util.TempDir, "*.tmp"))
|
||||
if nil != err {
|
||||
|
@ -663,7 +663,7 @@ func genCloudIndex(localDirPath string, excludes map[string]bool, calcHash bool)
|
||||
|
||||
func recoverSyncData(metaPath, indexPath string, modified map[string]bool) (decryptedDataDir string, upsertFiles []string, err error) {
|
||||
passwd := Conf.E2EEPasswd
|
||||
decryptedDataDir = filepath.Join(util.WorkspaceDir, "incremental", "sync-decrypt")
|
||||
decryptedDataDir = filepath.Join(util.TempDir, "incremental", "sync-decrypt")
|
||||
if err = os.RemoveAll(decryptedDataDir); nil != err {
|
||||
return
|
||||
}
|
||||
@ -772,7 +772,7 @@ func recoverSyncData(metaPath, indexPath string, modified map[string]bool) (decr
|
||||
}
|
||||
|
||||
func prepareSyncData(passwd string, unchangedDataList map[string]bool) (encryptedDataDir string, upsertList map[string]bool, err error) {
|
||||
encryptedDataDir = filepath.Join(util.WorkspaceDir, "incremental", "sync-encrypt")
|
||||
encryptedDataDir = filepath.Join(util.TempDir, "incremental", "sync-encrypt")
|
||||
if err = os.RemoveAll(encryptedDataDir); nil != err {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user