gilesknap / gphotos-sync

Google Photos and Albums backup with Google Photos Library API
Apache License 2.0
1.97k stars 161 forks source link

Protect BadIds.py from an empty bad ids file. #481

Closed peterjdolan closed 1 month ago

peterjdolan commented 1 month ago

When the bad ids file is empty (which could happen if the process is interrupted at an inopportune moment, then when the process next starts and attempts to read the file, there will be a crash due to accessing the length of a NoneType. safe_load returns None when the content of the file is empty.

gilesknap commented 1 month ago

Thanks for this. I'll make a release.