Jwink3101 / syncrclone

Python-based bi-direction sync tool for rclone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backup flag is not working

CcydtN opened this issue · comments

Although backup = False was set in the config.py, it still backup in both remotes. I can find files in the ".syncrclone/backup" folder.

I notice that in line 93 & 100 of main.py, the logging didn't include in the if config.backup block. It seems weird to me cause there is no need to log the backup step if it is skipping the process. You might want to take a look at that part.

My environment
OS: Archlinux
remote: Google drive

Hey! Thanks for checking out the tool!

It turns out that I was setting (and only testing) disabling backups via the CLI flag and never the config. I fixed that and added it to the tests. Good catch! While I have extensive tests, I also rely on battle-testing but I always use backups (and I strongly suggest you do too but that is besides the point)

I also followed your advice and removed logging a backup if there wasn't one. Honestly, there is some logging that happens when it doesn't need to but I am not too concerned about that since it is still telling you where it would be. But this was an easy fix so I did it.

Thanks for finding the bug! Glad it was a "safe" one where there is little harm in a backup that you didn't intend.