Skip to content

Commit 8aad8f5

Browse files
committed
fix: Fix transfer history clearing in-progress files too early
We recently upgraded SyncTrayzor's understanding of folder states, e.g. by adding the various -waiting states that SyncTrayzor previously did not understand. However, syncthing can flip-flop in between these states, for example by briefly going to syncing, then preparing (sync-waiting) and then back to syncing. Previously SyncTrayzor assumed that any non-syncing state meant that syncthing had completed any file transfers. This is no longer true with the various waiting states. Rather, only consider a folder as completed if it actually is idle (errors are handled seperately).
1 parent 7b0b315 commit 8aad8f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SyncTrayzor/Syncthing/TransferHistory/SyncthingTransferHistory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private void SyncStateChanged(object sender, FolderSyncStateChangedEventArgs e)
229229
{
230230
var folderId = e.FolderId;
231231

232-
if (e.PrevSyncState == FolderSyncState.Syncing)
232+
if (e.SyncState == FolderSyncState.Idle)
233233
{
234234
List<FileTransfer> transferredList = null;
235235
List<FileTransfer> completedFileTransfers; // Those that Syncthing didn't tell us had completed

0 commit comments

Comments
 (0)