Bug 388465

Summary: VFAT-safe file names cannot end with dot or space
Product: [Applications] amarok Reporter: Stefano Pettini <stefano>
Component: Collections/Organize Files DialogAssignee: Amarok Developers <amarok-bugs-dist>
Severity: minor CC: ralf-engels, simonandric5
Priority: NOR    
Version: 2.8.0   
Target Milestone: 2.9   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 2.9.0

Description Stefano Pettini 2018-01-02 21:03:23 UTC
According to Microsoft documentation, not only the following characters are not supported in VFAT <>:"/\|?* but also filenames cannot end with space of dot.

This last part is not corrected by the "VFAT-safe file name" option when renaming tracks. For example, songs ending with "..." create a problem.
Comment 2 Stefano Pettini 2018-02-22 23:46:57 UTC
Git commit fc9cce2bd8483a0473ea9b2514f239c07625466d by Stefano Pettini.
Committed on 22/02/2018 at 23:45.
Pushed by spettini into branch 'master'.

VFAT-safe file and directory names cannot end with dot

This adds special handling of trailing dots to vfatPath(),
that are replaced with '_'. This doesn't affect '.' and '..'.

  ../Music/R.E.M./Monster -> ../Music/R.E.M_/Monster

Unit tests updated, minor bugs when vfatPath() is invoked
with a PathSeparatorBehaviour not matching the system
detected by improving unit tests and fixed.

M  +23   -11   src/core/support/Amarok.cpp
M  +43   -11   tests/TestAmarok.cpp