lycheesync icon indicating copy to clipboard operation
lycheesync copied to clipboard

Add option to mark import directory as read-only

Open tribut opened this issue 8 years ago • 1 comments

When the directory lycheesyncer imports from is read-only and -l is used, importing of photos with wrong rotation fails:

ERROR;2016-04-24 17:06:35,232; lycheesync.lycheesyncer; [Errno 13] Permission denied: '/srv/vhosts/lychee/uploads/big/e59e6b335a07d61f8fde932d84a01906.jpg'
Traceback (most recent call last):
  File "/home/www-lychee/lycheesync/lycheesync/lycheesyncer.py", line 422, in sync
    self.adjustRotation(photo)
  File "/home/www-lychee/lycheesync/lycheesync/lycheesyncer.py", line 250, in adjustRotation
    img.save(photo.destfullpath, exif=exif_bytes, quality=99)
  File "/home/www-lychee/lycheesync/venv/lib/python3.4/site-packages/PIL/Image.py", line 1659, in save
    fp = builtins.open(filename, "wb")
PermissionError: [Errno 13] Permission denied: '/srv/vhosts/lychee/uploads/big/e59e6b335a07d61f8fde932d84a01906.jpg'
ERROR;2016-04-24 17:06:35,233; lycheesync.lycheesyncer; could not add P1200826.JPG to album Test

It would be great if there was a configuration option so only the thumbnails would be rotated in this case.

tribut avatar Apr 24 '16 15:04 tribut

Hi !

Thanks for this bug report. Indeed I should check file permission before rotating file. I will take this in charge when I had a little time.

Yhnaks again

GustavePate avatar Jun 04 '16 20:06 GustavePate