This commit is contained in:
life
2021-08-14 17:46:04 +08:00
parent 5cb9825eba
commit 9c02a81da1
2 changed files with 8 additions and 4 deletions

View File

@@ -1658,7 +1658,7 @@ var Note = {
var path = attachs[i].Path;
if(path && path.indexOf(fileBasePath) >= 0) {
try {
fs.unlink(path);
fs.unlink(path, () => {});
} catch(e) {
console.error(e);
}

View File

@@ -43,6 +43,7 @@ var Sync = {
},
*/
_needIncrSyncAgain: false,
_reSyncAgainTimes: 0,
// notebook
_syncNotebookIsLastChunk: false,
@@ -711,7 +712,8 @@ var Sync = {
// send changes
callback && callback();
} else {
console.error('_needIncrSyncAgain callback')
callback && callback();
}
});
@@ -778,6 +780,8 @@ var Sync = {
console.log('inc sync start');
if (again) {
console.log('again >>');
} else {
me._reSyncAgainTimes = 0
}
// 得到当前LastSyncUsn
@@ -953,7 +957,6 @@ var Sync = {
return;
}
console.error('---?? checkNeedIncSyncAgain ??------' + usn)
console.trace();
me._needIncrSyncAgain = true;
}
}
@@ -1205,8 +1208,9 @@ var Sync = {
me.addSyncProcessStatus(10);
// 重新再来一次增量同步
if (me._needIncrSyncAgain) {
if (me._needIncrSyncAgain && me._reSyncAgainTimes < 5) {
console.error(' needIncrSyncAgain')
me._reSyncAgainTimes++
me.fixConflictsForSendChanges(function() {
me.incrSync(true);
});