Posted April 30, 2025

If you only have the "database" in the root folder (and potentially gogrepoc.py itsself), like this:
---8<---------------
gog-manifest.dat
gog-manifest.dat.bak
gogrepo.log
gogrepo.log.1
gog-resume-manifest.dat
gog-resume-manifest.dat.bak
gog-token.dat
!md5_xmls
GOG
---8<---------------
"Cleanup stuff" should happen only below of the subfolder "GOG"; and even if not, each game would still have its own subfolder, and "!orphaned" as well as "!downloading" are also themselves folders, so no deletions/moves in the actual root folder should ever occur, or am I wrong?
On additional drives/partitions, youv'e only "System Volume Information" on modern Windows, which Windows will refuse to remove in all normal cases, even if not, it would be re-created, "only" eventually created "snapshots" of a previous state residing inside would be lost then.
It is not a good idea to have it in the actual "root folder" of the system, though, which is "/" on Linux and almost always "C:\" on Windows. Even that should work well, if there's no bug involved, but at least it makes things "messy" to have normal user files mixed with critical system stuff at the same place.
However, I see no problem to have it in the root of an external hard disk, even if it were a "flat" repository like this:
---8<---------------
wrapper-script.cmd
gog-manifest.dat
gog-manifest.dat.bak
gogrepo.log
gogrepoc.py
gog-resume-manifest.dat
gog-resume-manifest.dat.bak
gog-token.dat
!md5_xmls
!orphaned
!downloading
game_1
game_2
…
game_N
---8<---------------
The "trash" and "clean" and "clear_partial_downloads" commands should not try to remove anything from the root folder, as long as they're not buggy.
Besides, for Linux those names starting with "!" are a poor choice, because the "!" has a special meaning in most shells.