After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 435242 - Import images crashes when you don't have permissions on images
Import images crashes when you don't have permissions on images
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Import
SVN
Other Linux
: Normal major
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-02 16:49 UTC by eric
Modified: 2009-12-20 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against f-spot-0.6.1.5-0ubuntu1 (553 bytes, patch)
2009-12-09 16:26 UTC, Yann Leprince
none Details | Review

Description eric 2007-05-02 16:49:29 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.
Comment 1 Giacomo Rizzo 2007-09-18 15:21:56 UTC
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?
Comment 2 Stephane Delcroix 2007-09-19 08:17:01 UTC
eric:
- what are the permissions on your file ?
- did you unchecked the 'Copy to Photos folder' checkbox ?

Comment 3 André Klapper 2008-07-16 22:06:40 UTC
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!
Comment 4 Yann Leprince 2009-11-16 18:58:02 UTC
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]
Comment 5 Yann Leprince 2009-12-09 16:26:25 UTC
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.
Comment 6 Stephane Delcroix 2009-12-20 12:45:23 UTC
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.