kensanata / sitelen-mute

a static image gallery creator
https://alexschroeder.ch/software/Sitelen_Mute
GNU General Public License v3.0
75 stars 7 forks source link

Check for errors when calling exiftran (missing write permission) #18

Closed RandolfEbelt closed 6 years ago

RandolfEbelt commented 6 years ago

Hi, thanks for the fork and integrating patches!

I am getting an error while running:

./sitelen-mute /srv/data/Fotos/2018/05 gal -v

Found 9 prospective image files Image file inspection 100% completed - will now process 9 image files Thread 2 terminated abnormally: Fatal error:0180502_104114.jpg close failed on exiftran -aip '/home/re/static_gallery/sitelen-mute/gallery/files/20180502_104114.jpg' 2>/dev/null: Processing of 9 image files 100% completed
Use of uninitialized value in numeric comparison (<=>) at ./sitelen-mute line 927. ... Use of uninitialized value in numeric comparison (<=>) at ./sitelen-mute line 927. Use of uninitialized value in subroutine entry at ./sitelen-mute line 937. ... Use of uninitialized value in subroutine entry at ./sitelen-mute line 937. Fatal error: close failed on 7za -tzip a -- /home/re/static_gallery/sitelen-mute/gallery/files/album.zip /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/ /home/re/static_gallery/sitelen-mute/gallery/:

RandolfEbelt commented 6 years ago

Turns out the images in the path could not be accessed. Probably the error handling of the script could be improved ;)

kensanata commented 6 years ago

What kind of problem did you have? I tested it with a file to which I had no read permission and got a “can’t read file” error and an abort, so some things get treated correctly.

RandolfEbelt commented 6 years ago

The error was:

Found 9 prospective image files Image file inspection 100% completed - will now process 9 image files Thread 2 terminated abnormally: Fatal error:0180502_104114.jpg close failed on exiftran -aip '/home/re/static_gallery/sitelen-mute/gallery/files/20180502_104114.jpg' 2>/dev/null:

Files had permssions -rw-r--r-, owned by a different user.

kensanata commented 6 years ago

Thanks.

kensanata commented 6 years ago

Should be fixed in 019cea4.