Tested on Linux with libiptcdata-1.0.2. Data object.save() fails with:
IOError: [Errno 18] Invalid cross-device link: 'photo.jpg'
Quick fix to /tmp filesystem problem
Logged In: YES
File Added: libiptcdata-1.0.2-tmp.patch
Logged In: YES
Thanks for finding this. Your patch has been committed to the CVS version of libiptcdata.
It was only meant as a quick fix because it still leaves problems. The temp file now gets written to the current directory so there are two possible errors now:
1) The same error if the current path is on a different filesystem to the photo
2) The user doesn't have write access to the current directory
At least with the patch you can work around these in Python. I think the temp file should be in the same directory as the photo; it was just the limit of my C to delete a few characters from a string! (Although I'll stick my neck out and suggest that the fclose()'s should happen before the rename?)
Here's my attempt at a more complete fix. Definitely needs checking!
File Added: libiptcdata-1.0.2-py-filesystem.patch
Better fix using image directory instead of full path
Improved patch to use the image's directory instead of full name for temp file template and use mkstemp instead of mktemp.
File Added: libiptcdata-1.0.2-py-path.patch
Thanks for the update. I'm on a long travel right now until mid-November, so I'm not really doing much libiptcdata development at the moment, but I'll take a more thorough look at this when I return. Send me an email around then if you don't hear from me.
Better late than never.... I've updated CVS to your latest patch. I will be doing a new release shortly.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.