GNOME Bugzilla – Bug 435242
Import images crashes when you don't have permissions on images
Last modified: 2009-12-20 12:45:23 UTC
Import images hangs F-Spot when you don't have permissions on images. Create a folder of images and make sure you set them so you don't have permissions to the files then try to import that folder of images in F-Spot and you'll see what I mean.
That doesn't happen here... When I ask to import files from a 'd---' directory, the dialog can't simply list files in it. If permissions are 'dr--' it list photos when selecting the folder, but then it can't access the directory and the import wizard stop (the "Import" button doesn't activate). If permissions are 'dr-x', everything works fine. Would you please attach an 'ls -lid' of the directory you can't import from?
eric: - what are the permissions on your file ? - did you unchecked the 'Copy to Photos folder' checkbox ?
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!
I experience a bug that sounds similar with f-spot 0.6.1.5-0ubuntu1 (reported as Launchpad bug #483268 https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/483268 ). Steps to reproduce: 1) create an empty directory, put in the same image file twice with two different names 2) make the two files read-only (see ls -l below) 3) try to import the directory in f-spot yann@ubuntook:~/Bureau/test$ ls -l total 3648 -r--r--r-- 1 yann yann 1867712 2006-12-31 23:03 imgp0972 (copie).jpg -r--r--r-- 1 yann yann 1867712 2006-12-31 23:03 imgp0972.jpg I get an 'Import error' message box and the following is sent to stderr: item ImportCommand+SourceItem Error importing /home/yann/Bureau/test/imgp0972.jpg System.UnauthorizedAccessException: Access to the path "/home/yann/Images/Photos/2006/12/31/imgp0972-1.jpg" is denied. at System.IO.File.Delete (System.String path) [0x00000] at FileImportBackend.Step (.StepStatusInfo& status_info) [0x00000]
Created attachment 149447 [details] [review] Patch against f-spot-0.6.1.5-0ubuntu1 Here is a (trivial) fix for this bug against f-spot-0.6.1.5-0ubuntu1. It sets the permissions of all imported files to 'Normal', which may not be the best solution, but as C# is a windows-centric language I cannot think of a better solution (by the way, I am not a C# programmer). Please reopen this bug.
commit 8679939c0b4a030e76290e9c52506aba1a56f07e Author: Yann Leprince <sciyann@free.fr> Date: Sun Dec 20 13:42:44 2009 +0100 Set the attributes of copied files to Normal fixes bgo#435242 using the windows-centric way to set permissions is ok when using System.IO.File class to handle copies.