Bug 140170 - Files are not moved if the "Artist's Initial" folder at the destination already exists
Summary: Files are not moved if the "Artist's Initial" folder at the destination alrea...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 1.4.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-16 21:09 UTC by Johannes Schwietzke
Modified: 2010-01-04 18:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schwietzke 2007-01-16 21:09:33 UTC
Version:           1.4.4 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3) 
OS:                Linux

When I right-click one or more items from my collection and tell it to "Organize" amarok refuses to do so but says "Sorry, [number] files could not be organized.". When started from a shell the following message is posted to stdout (or stderr, i cannot tell): "trying to create local folder [Collection Folder]/[Artist's Initial]: Die Datei existiert bereits" (the German sentence after the colon means: "the file already exists").

The source partition as well as the target partition are formatted with the FAT32 file system and mounted with the following options: type vfat, rw, nosuid, nodev, noatime, iocharset=utf8, gid=100, umask=0002). I am sure that I have write permissions on that partitions.

Anyway, this feature "partially" works: When I selected an arbitrary Album of an artist whose initial was not existing as a folder on the target folder amarok created it correctly and moved the first few (two or three files) to their proper destination. However, after these files it refused to move the others.

The same goes for importing files from my playlist which are not in my collection-folder in the first place: if the "Initial" folder already exists the file will not be copied with the according error message in the shell. If it does not exist, the file is copied correctly. If I try to import multiple files this was, again, the first few files are processed, the others skipped.

If I uncheck "Group by Artist's Initial" everything seems to work quite well so far.

Bug 123569 seems to discuss similar problems but it was closed.

In the "Organize Collection Files"-Form the check-boxes are configured as follows:
[ ] Use Cover Art for Folder Icons
[ ] Group by File Type
[x] Group by Artist's Initial
under "Details >>":
[ ] Custom Format
[ ] Group by File Type
[x] Group by Artist's Initial
[x] Replace Spaces with Underscores
[x] Restrict to ASCII
[x] VFAT Safe Names
[x] Overwrite Destination
Comment 1 Martin Aumueller 2007-01-28 02:39:11 UTC
This is probably due to FAT32's case insensitiveness: it sees that directory 'A' does not yet exist, tries to create it, but this fails because 'a' already exists. Right?
Comment 2 Johannes Schwietzke 2007-01-29 15:02:25 UTC
I think you are right. I played a little with organizing on reiserfs and ext3 without problems like this. There seems to be another related problem: Amarok won't find (the few) files from its database that were organized by amarok itself in single capital letter folders like 'A' on my fat32-partitions because the folder now is 'a', not 'A'. 

ls /mnt/[fat32partion]/A does not work either. A multiple letter directory is created correctly and capital letters are kept. mkdir 'aA' produces a folder called 'aA' that cannot be accessed by 'ls Aa' for example. But it can be accessed by 'ls aa' (or 'ls aA'). That might be the reason why organizing files without the 'Group by Artist's Initial'-flag set works even on fat32-partitions.

Maybe amarok should just avoid capital letters together with fat32-partitions in general.
Comment 3 Johannes Schwietzke 2007-10-22 18:48:21 UTC
I am still experiencing this bug in version 1.4.7. I guess it would be easy to fix but I am not a developer. Maybe add a function to the "VFAT safe names"-Feature that handles its case insensitiveness.
Comment 4 Michael Leupold 2008-06-15 17:21:13 UTC
comment from KDE bugsquad member

I can still reproduce this in 1.4.9.1. Can't test in Amarok2 trunk r820602 as the organize functionality is not fully implemented yet.
Comment 5 Lydia Pintscher 2008-08-06 00:18:06 UTC
I am sorry but this will not get fixed in Amarok 1.4 as we are focused on Amarok 2 now.

Thank you for your report.
Comment 6 Marcel Transier 2010-01-04 02:39:37 UTC
I'm experiencing the same No-Single-Capital-Letter-Directory under Amarok 2.2.0 too.

To make things worse, Folders created as A, B, C using Windows7 on a Fat32 external harddrive will show up as A,B,C under windows, but as a,b,c under Linux.

Does this mean I don't have a chance to use the %initial when using a FAT Drive?

I know it's not an amarok bug but rather a FAT-gotcha, but i don't think Fat is uncommon on USB-drives and this problem has the potential to make "safe names for VFAT" useless.

My proposed workaround would be to provide a %initial_small along with the %initial format option.

Tomorrow I'll try "artists with %initial" instead of a simple %initial. Might work, but it's not really intuitive.
Comment 7 Myriam Schweingruber 2010-01-04 18:06:56 UTC
Marcel, please open a new report, this one was about a completely different version that is not maintained anymore.