Please sign in to comment.
Implement simple update of existing fgallery
This fails when sanitizing filenames results in duplicates (which are then resolved by appending "_$n"). As long as your gallery has files with names such as IMG_123.JPG you're fine. Problematic would be a gallery containing both IMG_123 1.JPG and IMG_123_1.JPG -- the first one gets sanitized to IMG_123_1.JPG, and the second one then has a name collision so it gets renamed to IMG_123_1_1.JPG. In this case, if IMG_123 1.JPG is an existing file in your gallery and IMG_123_1.JPG is a new file in your gallery, the update will skip it since the code checks whether IMG_123_1.JPG exists (it does) without knowing that it should be checking IMG_123_1_1.JPG instead. In order to fix this, we would have to store more information in data.json (or write a new file containing this information).
- Loading branch information...