Bug 146887 - Album names get created with *spaces* in the filesystem
Summary: Album names get created with *spaces* in the filesystem
Status: RESOLVED INTENTIONAL
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (show other bugs)
Version: 0.9.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-17 06:27 UTC by Richard Neill
Modified: 2023-04-08 20:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments
Space char used in file nemas and album names (295.84 KB, image/png)
2007-06-17 09:31 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Neill 2007-06-17 06:27:16 UTC
Version:           0.9.1 (using KDE 3.5.6, Kubuntu (feisty) 4:3.5.6-0ubuntu14)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.20-15-generic

Spaces in filenames and directory names are pure evil. If I create an album named "My Holidays in France", from the GUI, may I ask that digikam creates the directory as "My_Holidays_in_France" ?
Conversely, underscores should be displayed as spaces.

The problem wouldn't matter quite so much, except that digikam uses its own database - and that means that modifying filenames from the shell after creating albums is likely to cause pain.  So I can't just run my "remove_spaces.sh" script on the whole photographs directory.
Comment 1 caulier.gilles 2007-06-17 09:29:59 UTC
This problem is not reproductible on my computer_s_. Mandriva 2007.0/2007.1 and Suse 10.1/10.2 used...

I use space everywhere : file names and album names... Screenshot attached.

If digiKam crash, please give us a GDB backtrace...

Gilles Caulier
Comment 2 caulier.gilles 2007-06-17 09:31:16 UTC
Created attachment 20873 [details]
Space char used in file nemas and album names
Comment 3 Richard Neill 2007-06-17 20:08:10 UTC
Sorry - I don't think I was very clear about this. What I mean is, file and directory names should never be created with spaces in them, because, although it is technically permissible, it causes lots of trouble for shell users.

My suggestion is that digikam ought to behave in the same way as XMMS, i.e. in the GUI, display spaces, but in the filesystem, replace metacharacters by underscores.

Digikam works just fine on its own, but for me, the fundamental, pre-eminent interface to everything is bash; spaces in filenames are just A Bad Thing!
Comment 4 caulier.gilles 2007-06-17 20:43:14 UTC
If i understand you, you want mean than space char in file names in directory path   is a shame to drive under Unix ???

This is incredible. I will imediatly returned under Win32 !

Gilles Caulier
Comment 5 Richard Neill 2007-06-17 21:09:25 UTC
That was basically what I meant. File/directory-names containing spaces (and other metacharacters) tend to mess up shell-scripts. Yes, we *can* work with them, but it's ugly, and is an unnecessary source of potential errors. For example, if filenames have spaces, then we must be *very* careful with quoting; likewise, double-clicking a filename in konsole (to select it) doesn't work. The technique of space<->underscore conversion is a much safer way to do it.

As I see it, the Album Name is a piece of English text, whereas the filename is not. Compare for music: the English name "Beethoven's Symphony Number 5 in C" vs the filename: ~/music/Beethoven/Beethoven_-_Symphony_Number_5_in_C_-_Mvt_1.ogg"

Comment 6 Frank Siegert 2007-06-18 11:15:25 UTC
I agree with Gilles. I would be really annoyed, if digikam changed spaces to underscores in filenames. 
If I want underscores, I'll tell digikam, and it will use them. If I want spaces, I'll tell digikam, and it will use them. The filesystem is perfectly capable of dealing with spaces, why should we annoy users with this old thinking??? If you want to use bash scripts, write them in a way that they can deal with spaces in filenames, or they are not worth it.
Comment 7 Mikolaj Machowski 2007-06-18 12:50:16 UTC
I would suggest to close this with WONTFIX.

----------------------------------------------------
"Szklana Pu
Comment 8 caulier.gilles 2007-06-18 12:59:08 UTC
Right Mik...

Gilles