Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to mark import directory as read-only #60

Open
tribut opened this issue Apr 24, 2016 · 1 comment
Open

Add option to mark import directory as read-only #60

tribut opened this issue Apr 24, 2016 · 1 comment
Labels

Comments

@tribut
Copy link
Contributor

tribut commented Apr 24, 2016

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.

@GustavePate
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants