From 98cbd3d80f419dd4cce4fc1c652d8ec7ae386fa4 Mon Sep 17 00:00:00 2001 From: b0oh Date: Sat, 29 Mar 2025 10:41:39 +0700 Subject: [PATCH] Remove waiting for refchan on run directory as it fails on freshly created sync --- hbs2-sync/src/HBS2/Sync/Internal.hs | 6 +++--- hbs2-sync/src/HBS2/Sync/State.hs | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hbs2-sync/src/HBS2/Sync/Internal.hs b/hbs2-sync/src/HBS2/Sync/Internal.hs index 35546449..74db1f0a 100644 --- a/hbs2-sync/src/HBS2/Sync/Internal.hs +++ b/hbs2-sync/src/HBS2/Sync/Internal.hs @@ -242,11 +242,11 @@ hbs2-sync init --refchan 94GF31TtD38yWG6iZLRy1xZBb1dxcAC7BRBJTMyAq8VF refchan <- view dirSyncRefChan env - & orThrowUser "refchan not found" + & orThrowUser "refchan not found" state <- getStateFromRefChan refchan let tombs = filter (isTomb . snd) state - for_ tombs $ \(path, entry) -> do + for_ tombs $ \(path, entry) -> do when (isTomb entry) do liftIO $ putStrLn path @@ -258,7 +258,7 @@ hbs2-sync init --refchan 94GF31TtD38yWG6iZLRy1xZBb1dxcAC7BRBJTMyAq8VF refchan <- view dirSyncRefChan env - & orThrowUser "refchan not found" + & orThrowUser "refchan not found" accepted <- getAccepted refchan <&> L.sortOn getEntryTimestamp diff --git a/hbs2-sync/src/HBS2/Sync/State.hs b/hbs2-sync/src/HBS2/Sync/State.hs index 239de3bd..9c601644 100644 --- a/hbs2-sync/src/HBS2/Sync/State.hs +++ b/hbs2-sync/src/HBS2/Sync/State.hs @@ -776,9 +776,6 @@ runDirectory = do refchan <- view dirSyncRefChan env & orThrow RefChanNotSetException - waitForRefchan refchan (TimeoutMin 1) - >>= orThrow RefChanHeadNotFoundException - -- FIXME: multiple-directory-scans local <- getStateFromDir0 True