Only purge orphaned WebDAV files if downloads completed successfully
This commit is contained in:
parent
d2d5896b0b
commit
db6e9841db
|
@ -262,7 +262,7 @@ Zotero.Sync.Storage.Engine.prototype.start = Zotero.Promise.coroutine(function*
|
|||
}
|
||||
|
||||
// If WebDAV sync, purge orphaned files
|
||||
if (this.controller.mode == 'webdav') {
|
||||
if (downloadSuccessful && this.controller.mode == 'webdav') {
|
||||
try {
|
||||
yield this.controller.purgeOrphanedStorageFiles(libraryID);
|
||||
}
|
||||
|
|
|
@ -1071,7 +1071,7 @@ Zotero.Sync.Storage.Mode.WebDAV.prototype = {
|
|||
lastModified = Zotero.Date.strToISO(lastModified);
|
||||
lastModified = Zotero.Date.sqlToDate(lastModified, true);
|
||||
|
||||
// Delete files older than a day before last sync time
|
||||
// Delete files older than a week before last sync time
|
||||
var days = (lastSyncDate - lastModified) / 1000 / 60 / 60 / 24;
|
||||
|
||||
if (days > daysBeforeSyncTime) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user