Redownload file marked as a forced download when opening file

Previously we were redownloading only `SYNC_STATE_TO_DOWNLOAD` files,
not `SYNC_STATE_FORCE_DOWNLOAD`, because the latter gets downloaded even
when using on-demand file syncing, but if the download fails for some
reason, it should be retried on a manual open.
This commit is contained in:
Dan Stillman 2024-06-16 05:48:40 -04:00
parent e7ddf810c0
commit f7d7625c1c

View file

@ -4817,7 +4817,10 @@ var ZoteroPane = new function()
if (fileExists
&& !isLinkedFile
&& fileSyncingEnabled
&& (item.attachmentSyncState == Zotero.Sync.Storage.Local.SYNC_STATE_TO_DOWNLOAD)) {
&& ([
Zotero.Sync.Storage.Local.SYNC_STATE_TO_DOWNLOAD,
Zotero.Sync.Storage.Local.SYNC_STATE_FORCE_DOWNLOAD
].includes(item.attachmentSyncState))) {
Zotero.debug("File exists but is queued for download -- re-downloading");
redownload = true;
}