reports read permission as "photo library folder was not writable"

Bug #1886732 reported by Daniel Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shotwell
New
Unknown
shotwell (Ubuntu)
Triaged
Low
Unassigned

Bug Description

1) Ubuntu version: Ubuntu 20.04 LTS

2) shotwell package version: 0.30.10-0ubuntu0.1

3)
 a. I'm performing "Import from folder" from an external drive.
 b. This external drive is formatted as HFS+, comes from a Mac, and by default it's mounted as read-only, which is OK.
 c. As result of the import, some files (both photos and videos) are imported ok, while some others don't.
 d. For those which are not imported, the error reported in the UI is "953 photos/videos failed to import because the photo library folder was not writable", which doesn't make sense, as some others were imported.

Looking further, I came to found in ~/.cache/shotwell/shotwell.log the following pattern:

L 3733 2020-07-07 20:47:09 [WRN] BatchImport.vala:1840: Unable to perform MD5 checksum on file <source-file>: Error opening file <source-file>: Permission denied
L 3733 2020-07-07 20:47:09 [WRN] BatchImport.vala:1405: Import failure <source-folder>: File write error

By checking the code, I see convert_error method maps several different error codes to ImportResult.FILE_WRITE_ERROR
In particular, lines 124 and 125 map IOError.PERMISSION_DENIED to ImportResult.FILE_WRITE_ERROR

            else if (ioerr is IOError.PERMISSION_DENIED)
                return ImportResult.FILE_WRITE_ERROR;

But in this case, the permission denied came from the read, and not from the write.
BTW: Permission denied has to do with different permissions for those files, so it's ok to not have been imported.

4) It's ok for Shotwell to fail importing files without read permission, but the error message confuses the user, which may understand Shotwell library got corrupted (as on same operation some files were imported and some others don't). A better error message could be "953 photos/videos failed to import because permission was denied to read the source files"

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, that seems to be an upstream issue, could you also report it on https://gitlab.gnome.org/GNOME/shotwell/-/issues ?

Changed in shotwell (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Daniel Alonso (eldanialonso) wrote :

Thank you Sebastien, I've followed your advise and submitted https://gitlab.gnome.org/GNOME/shotwell/-/issues/267

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

Changed in shotwell (Ubuntu):
status: Confirmed → Triaged
summary: - Shotwell fails to import and wrongly reports "photo library folder was
- not writable"
+ Shotwell reports read permission as "photo library folder was not
+ writable"
summary: - Shotwell reports read permission as "photo library folder was not
- writable"
+ reports read permission as "photo library folder was not writable"
affects: ubuntuone-shotwell-plugin → shotwell
Changed in shotwell:
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.