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) }