handle existing Pictures dir gracefully
Submitted by an unknown user
Assigned to Jim Nelson
Link to original bug (#716179)
Description
---- Reported by shotwell-maint@gnome.bugs 2010-05-16 10:42:00 -0700 ----
Original Redmine bug id: 1931
Original URL: http://redmine.yorba.org/issues/1931
Searchable id: yorba-bug-1931
Original author: Monty Taylor
Original description:
My photos on Ubuntu were already in a directory called Pictures (standard place for gPhoto to stick them I believe) I installed shotwell and opened it up. Of course, since it uses its own db for metainfo, it had no idea about that photos that were there. That's fine.
But then I went to “Import photos from folder†and tried to import from Pictures. This failed with a “directory already exists†error, which was not only confusing because I was selecting a folder to read and got an error about not being able to create a directory, but also somewhat off-putting because it was a blocker. (The workaround was, of course, to just rename Pictures to Pictures.old and then import from that)
I don't have a proper UI suggestion for this, but with Ubuntu switching to Shotwell for 10.10, I imagine this will come up.
---- Additional Comments From shotwell-maint@gnome.bugs 2013-05-01 11:47:00 -0700 ----
History
Comment 1
Updated by Adam Dingle over 3 years ago
mordred,
I'm not able to reproduce this, either in the trunk or with Shotwell 0.5. If I import from the Pictures directory, everything works fine.
On your machine, if you import from the Pictures directory now, do you still see this error? If not, if you rename Pictures to Pictures.new, then rename your Pictures.old to Pictures and then try to import, do you see the error? It would be nice to fix this, but we need to figure out how to reproduce this first.
Comment 2
Updated by Monty Taylor over 3 years ago
Ok. I've narrowed it down.
Importing from Pictures works, but not if “Copy files to Pictures Photo Library†is checked. So I suppose it could be not-a-bug… or perhaps just a place where the error message could be more helpful in this particular (granted slightly odd) case. I dunno. :)
Comment 3
Updated by Adam Dingle over 3 years ago
Unfortunately I still can't reproduce this either in trunk or in 0.5, whether or not “Copy files to Pictures Photo Library†is checked. I wonder whether this could be a permissions problem. Could you possibly run “ls -lR ~/Pictures†and attach the output here?
Comment 4
Updated by Monty Taylor over 3 years ago
Crazy. It's completely reproducible for me on both 0.50 and trunk. … attaching ls -lR
FWIW, the error message happens very early in the import, so I get it whether I've successfully imported or not. (as in, I can delete ~/.shotwell and run the import and it'll fail, or I can run the import with the checkbox unchecked and it will succeed and then if I try again with the checkbox checked, it'll fail before even trying to import and cull duplicates.
Comment 5
Updated by Adam Dingle over 3 years ago
- Status changed from Open to Review
- Assignee changed from Anonymous to Jim Nelson
- Priority set to High
Jim, can you work with mordred to figure out what's going wrong?
Comment 6
Updated by Jim Nelson over 3 years ago
HI Mordred,
Could you run “cat ~/.config/user-dirs.dirs†and post the output here? Thanks.
Comment 7
Updated by Monty Taylor over 3 years ago
XDG_DESKTOP_DIR=“$%(=caps)HOME%/Desktopâ€
XDG_DOWNLOAD_DIR=“$%(=caps)HOME%/Desktopâ€
XDG_TEMPLATES_DIR=“$%(=caps)HOME%/Templatesâ€
XDG_PUBLICSHARE_DIR=“$%(=caps)HOME%/Publicâ€
XDG_DOCUMENTS_DIR=“$%(=caps)HOME%/Documentsâ€
XDG_MUSIC_DIR=“$%(=caps)HOME%/Musicâ€
XDG_PICTURES_DIR=“$%(=caps)HOME%/Picturesâ€
XDG_VIDEOS_DIR=“$%(=caps)HOME%/Videosâ€
Comment 8
Updated by Jim Nelson over 3 years ago
Ok, this is kind of a stumper. I'm not exactly sure what's going on here.
Two more things, if you could:
- Run Shotwell from the terminal like this:
SHOTWELL_LOG=1 shotwell > log.txt 2>&1
This will dump the log to log.txt. If you could attach this file here, that would be great.
- When the error dialog appears, could you take a screenshot and attach it to this ticket, or type in your reply the exact message?
These two things will give me an idea of where in the code the error is originating.
Thanks!
Comment 9
Updated by Monty Taylor over 3 years ago
I do my best to provide stumpers!
Comment 10
Updated by Jim Nelson over 3 years ago
- Status changed from Review to 5
- Resolution set to worksforme
- % Done set to 0
Hey mordred --
I've been busy working to get 0.6.0 out the door, but the screenshot you sent us shed some light on this bug. Specifically, this error message is not coming from Shotwell but from the GTK File Chooser dialog. I am now able to reproduce this. I do the following:
Select File -> Import From Folder…
The chooser comes up in my home directory. Instead of selecting a folder with the mouse, I type in the directory I want to import from (in this case, “Picturesâ€).
Note that autocompletion will add a slash to the end of the text (“Pictures/â€). Remove the slash.
When I press Enter, an error dialog pops up: “The folder could not be created / Error creating directory: File existsâ€
I've looked in the GTK File Chooser code, and this is very much their error message, not ours. Shotwell is waiting for the dialog to exit to continue. I believe this is a GTK bug. The workaround, if you decide to type it out, is to leave the trailing slash -- everything works fine then.
I'm marking this as worksforme, as I don't believe Shotwell is doing anything wrong here. If there is other behavior I'm missing here, please feel free to re-open.
Comment 11
Updated by Charles Lindsay 7 months ago
- Status changed from 5 to Invalid
--- Bug imported by chaz@yorba.org 2013-11-25 21:44 UTC ---
This bug was previously known as bug 1931 at http://redmine.yorba.org/show_bug.cgi?id=1931 Imported an attachment (id=261653) Imported an attachment (id=261654) Imported an attachment (id=261655)
Unknown Component Using default product and component set in Parameters Unknown version " in product shotwell. Setting version to "!unspecified". Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Resolution: RESOLVED INVALID