Bug 312574 - VFAT safe names missing a couple of idiosyncrasies.
Summary: VFAT safe names missing a couple of idiosyncrasies.
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Unclassified
Component: Collections/USB mass storage and MSC (show other bugs)
Version: 2.6.0
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: 2.7
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 23:51 UTC by Thiago Jung Bauermann
Modified: 2013-02-03 21:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.8


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Jung Bauermann 2013-01-03 23:51:42 UTC
I'm having problems when copying music to a collection in a USB Mass Storage device with the "VFAT safe names" option checked.

VFAT doesn't accept file or directory names ending in a space:

hactar% touch 'blah '
touch: setting times of `blah ': No such file or directory
hactar% mkdir 'blah '
mkdir: cannot create directory `blah ': Invalid argument

It also ignores periods in the end of a file or directory name:

hactar% ls blah
ls: cannot access blah: No such file or directory
hactar% touch blah.
hactar% ls blah
blah
hactar% ls blah.
blah.
hactar% ls blah.....
blah.....
hactar% mkdir blah.
mkdir: cannot create directory `blah.': File exists
hactar% rm blah
hactar% mkdir blah..
hactar% ls -d blah
blah/
hactar% mkdir blah
mkdir: cannot create directory `blah': File exists
hactar% mkdir blah...
mkdir: cannot create directory `blah...': File exists

The result is that Amarok can't create a destination directory for an album called (for example) "On verra plus tard ...", since it would effectively be trying to create a directory called "On verra plus tard " (with a space in the end of the directory name) and VFAT doesn't accept that.

This is also a problem when a music track doesn't have album name information and the directory structure is of the form "Artist - Album Name". It will try to create a directory "Artist - " (also with a space in the end).

The workaround I'm using is to chekc the option to substitute spaces with underscores.

Reproducible: Always
Comment 1 Ralf Engels 2013-02-03 21:30:53 UTC
Git commit 26e79f334803d757e971df1ad46f9bb5b0bb151d by Ralf Engels.
Committed on 03/02/2013 at 22:04.
Pushed by rengels into branch 'master'.

Fix: VFAT safe names missing a couple of idiosyncrasies

There was some confusion about sanitizing parts or the whole path
FIXED-IN: 2.8

M  +8    -9    src/dialogs/TrackOrganizer.cpp
M  +1    -1    src/dialogs/TrackOrganizer.h

http://commits.kde.org/amarok/26e79f334803d757e971df1ad46f9bb5b0bb151d