Bug 327244 - Automatic album generation produces only lower case album / folder names
Summary: Automatic album generation produces only lower case album / folder names
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-PostProcessing (show other bugs)
Version: 3.4.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 19:59 UTC by Rico
Modified: 2016-12-10 20:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rico 2013-11-06 19:59:43 UTC
I am importing images from a camera (Canon EOS 5D Mk II) that is connected to the computer directly via USB.
I use both automatic file renaming and automatic album creation based on file dates.

File renaming works perfectly. Using this pattern: [date:"yyyy_MM_dd"]_Abc_###[e]
I get exactly the result I expect, e.g. 2013_10_03_Abc_001.jpg

But there is a small problem with album generation.
When I try to generate albums based on date with this pattern: yyyy_MM_dd_'Abc'
I can see exactly what I expect in the preview: 1968_12_26_Abc
But the generated album / folder name is in fact: 2013_10_03_abc

I can't see a reason why the uppercase letters are converted to lowercase.

Reproducible: Always

Steps to Reproduce:
1. Open camera import in digikam
2. Select automatic generation of albums based on file dates
3. Use a pattern that contains uppercase letters like yyyy_MM_dd_'Abc'
4. Import some images
Actual Results:  
Name of created album: 2013_10_03_abc


Expected Results:  
Name of created album: 2013_10_03_Abc
Comment 1 Teemu Rytilahti 2013-12-02 15:05:31 UTC
The directory name is lowercased in digikam/utilities/importui/main/importui.cpp's createDateBasedSubAlbum() and there's this comment there:
// See B.K.O #136927 : we need to support file system which do not
// handle upper case properly.

Should there be a check for target filesystem's case-sensitivity support?
Comment 2 caulier.gilles 2013-12-02 15:46:05 UTC
yes, but how to do it ? bu Qt or KDE API ? investigation are required here...

Gilles
Comment 3 Teemu Rytilahti 2013-12-05 00:16:13 UTC
I think there's no need nowadays for undercasing the paths

From my quick tests on Arch with a test file, the original problems sounds like a mounting problem of the distribution or that things have changed since then. You can try the following:
tuli:/tmp:% dd if=/dev/zero of=fat32.disk bs=1K count=1M
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 0.89088 s, 1.2 GB/s
tuli:/tmp:% mkfs.vfat fat32.disk                        
mkfs.fat 3.0.23 (2013-10-15)
tuli:/tmp:% mkdir fattest
mkdir: cannot create directory ‘fattest’: File exists
tuli:/tmp:% rm -rf fattest 
tuli:/tmp:% mkdir fattest
tuli:/tmp:% sudo mount fat32.disk fattest
tuli:/tmp:% mkdir fattest/FOO
mkdir: cannot create directory ‘fattest/FOO’: Permission denied
tuli:/tmp:% sudo !!
tuli:/tmp:% sudo mkdir fattest/FOO
tuli:/tmp:% sudo touch fattest/foo/bar 
tuli:/tmp:% sudo touch fattest/FOO/Quux
tuli:/tmp:% ls -al fattest/FOO/quux 
-rwxr-xr-x 1 root root 0 Dec  5 01:13 fattest/FOO/quux
tuli:/tmp:% ls -al fattest/FOO/Quux
-rwxr-xr-x 1 root root 0 Dec  5 01:13 fattest/FOO/Quux
tuli:/tmp:% ls -alR fattest/       
fattest/:
total 8
drwxr-xr-x  3 root root 4096 Dec  5 01:13 .
drwxrwxrwt 71 root root 2000 Dec  5 01:12 ..
drwxr-xr-x  2 root root 4096 Dec  5 01:13 FOO

fattest/FOO:
total 8
drwxr-xr-x 2 root root 4096 Dec  5 01:13 .
drwxr-xr-x 3 root root 4096 Dec  5 01:13 ..
-rwxr-xr-x 1 root root    0 Dec  5 01:13 bar
-rwxr-xr-x 1 root root    0 Dec  5 01:13 Quux
Comment 4 caulier.gilles 2013-12-05 08:03:44 UTC
Teemu,

Uncomment this line :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/importui/main/importui.cpp#L2191

And check :

1/ if capitalization problem disappear
2/ if there is no regression with bug #136927

Gilles Caulier
Comment 5 caulier.gilles 2014-09-01 08:41:51 UTC
Teemu,

Do you seen my previous comment ?

Gilles Cauleir
Comment 6 caulier.gilles 2016-07-06 16:11:20 UTC
This file still valid using last digiKam 5.0.0 ?

Gilles Caulier
Comment 7 caulier.gilles 2016-11-25 06:56:16 UTC
This problem still reproducible using last DK 5.4.0 bundle ?

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWlRJenM

Gilles Caulier
Comment 8 Unknown 2016-12-10 20:14:50 UTC
Git commit 36203280f48eb2e04ecc0b95d41597b2f16eacac by Maik Qualmann.
Committed on 10/12/2016 at 20:13.
Pushed by mqualmann into branch 'master'.

remove lower case conversion from sub album creation
FIXED-IN: 5.4.0

M  +2    -1    NEWS
M  +0    -8    utilities/importui/main/importui.cpp

https://commits.kde.org/digikam/36203280f48eb2e04ecc0b95d41597b2f16eacac