GNOME Bugzilla – Bug 544193
Forced lowercase when import is triggered by gnome-volume-manager
Last modified: 2010-07-12 16:32:30 UTC
Please describe the problem: One of F-Spot's import dialogs seems to force lowercase filenames when importing. Steps to reproduce: 1. Insert a memory card, and wait for F-Spot to be automatically started by gnome-volume-manager. 2. Use the presented import dialog, and import some photos. 3. Then take a look at the metadata section (lower-left of f-spot). Actual results: Filename are called for example "img_1111.cr2" Expected results: Filenames should be called "IMG_1111.CR2" Does this happen every time? Yes, it always happens when importing via gnome-volume-manager. The regular import dialog (on the File menu) does not suffer from this. Other information: Besides the fact that we should leave filenames alone during import. This is also inconsistent behaviour as one import dialog leaves filename as is (and thus keeping the uppercase), and another force lowercases filenames. Inconsistent behaviour is _always_ bad.
Created attachment 115027 [details] [review] Remove the .ToLower call in the second import dialog, leaving the filename be as-is. I've tested this using F-Spot 0.4.4, and this seems to fix the above bug. With this patch, filenames are left alone.
memory cards are vfat, vfat is case insensitive. So, as the default naming scheme for unix is to use lowercase for filename, most distributions are ensuring that compatibility by a correct mount option. so, in order to be consistent, while using the gphoto2 driver, we're ensuring CONSISTENCY by adding a ToLower.
Well, that's the whole point, what consistency? The lower case unix consistency is valid for system files, libraries, etc. Not for user files! In the homedir everything is fare game. But if we really want to provide consistency the other "normal" import dialog should lowercase files as well. Not all distro's force lowercase everything on VFAT. Which is probably bad practise. As vfat can be case _preserving_. Which means the case is preserved as the application who actually wrote the file intended it. And seemingly some camera's use uppercase. /dev/sdb1 on /media/CANON_DC type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush) My point being... Either both import dialogs should force lowercase, or they both should not! Currently the normal dialog does not seem to be bothered with case, while the other forces lowercase. This is by definition inconsistent.
Created attachment 116642 [details] Screenshot of mixed case filenames on a VFAT volume.
Comment #2 from Stephane Delcroix (points: 20) 2008-08-12 12:46 UTC [reply] memory cards are vfat, vfat is case insensitive. Yes, VFAT is case insensitive. BUT: VFAT *preserves* filename case. Try it out yourself, or take a look at this screenshot: http://bugzilla.gnome.org/attachment.cgi?id=116642 So the point is that F-Spot throws away the filename case. The ToLower call is a bug and should be removed.
This is related to my newly added bug #575871
Comment on attachment 115027 [details] [review] Remove the .ToLower call in the second import dialog, leaving the filename be as-is. Maintenance update: In the past we've been less than stellar in reviewing patches. As such we have a pile of patches in bugzilla which are outdated and don't apply anymore. Am currently marking all of these as "needs-work". My apologies for this. Since I've become a maintainer of the project, I've set the personal rule of quickly reviewing all patches, to avoid that this happens again. If you (or anyone) wants to go through the trouble of updating this patch, please talk to us to figure out if it fits in the F-Spot long term roadmap. Should you, in the future, notice a patch lingering around for too long, please notify us immediately and we'll look into it, to avoid situations like these from happening again. You can filter these mails by searching for ###F-OLDPATCHCLEANUP###
Review of attachment 115027 [details] [review]: CameraFileSelectionDialog.cs has been deleted in commit 0e076603a363a6b571ecb8e21534a834c1fd5e9d .
Shouldn't be an issue anymore in latest F-Spot.