Skip repeated file syncs for libraries with no uploaded files

This commit is contained in:
Dan Stillman 2013-03-11 21:41:51 -04:00
parent d25d49de66
commit c270766540

View file

@ -238,14 +238,23 @@ Zotero.Sync.Storage = new function () {
// If we don't have any forced downloads, we can skip // If we don't have any forced downloads, we can skip
// downloads if the last sync time hasn't changed // downloads if the last sync time hasn't changed
if (downloadAll && !downloadForced && lastSyncTime) { // or doesn't exist on the server (meaning there are no files)
var version = self.getStoredLastSyncTime( if (downloadAll && !downloadForced) {
libraryModes[libraryID], libraryID if (lastSyncTime) {
); var version = self.getStoredLastSyncTime(
if (version == lastSyncTime) { libraryModes[libraryID], libraryID
Zotero.debug("Last " + libraryModes[libraryID].name );
+ " sync time hasn't changed for library " if (version == lastSyncTime) {
+ libraryID + " -- skipping file downloads"); Zotero.debug("Last " + libraryModes[libraryID].name
+ " sync time hasn't changed for library "
+ libraryID + " -- skipping file downloads");
downloadAll = false;
}
}
else {
Zotero.debug("No last " + libraryModes[libraryID].name
+ " sync time for library " + libraryID
+ " -- skipping file downloads");
downloadAll = false; downloadAll = false;
} }
} }