From 195c4ab3adc419a8530106fb8c36e27cbba1b887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Mon, 1 Jul 2024 20:08:23 +0200 Subject: [PATCH] Add insane ramblings --- util.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util.go b/util.go index 4ed4c2a..6246bde 100644 --- a/util.go +++ b/util.go @@ -127,6 +127,13 @@ func GetSyncFilesRecursively(input string, output chan string, status chan error } }() + // This actually does not go through ALL files sadly... + // It so happens (very often) that we manage to quit between one iteration ending + // And another beginning + // In such a state workgroup is decreased and, before it has a chance to increase, we are done + // What I should do here is only terminate if directories is empty + // ...but how do I do that? + // I might be wrong... Fuck knows... wg.Wait() log.Printf("Files processed: %d; Folders processed: %d", filesProcessed, foldersProcessed) }