After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720217 - If transfer to device fails with non-sanitized filename, try with sanitized one
If transfer to device fails with non-sanitized filename, try with sanitized one
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: general
3.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-10 22:09 UTC by Adam Williamson
Modified: 2018-05-24 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Williamson 2013-12-10 22:09:16 UTC
I bought a 64GB microSD card and it was exfat-formatted from the factory. As per http://www.ntfs.com/exfat-filename-dentry.htm , exfat has similar filename restrictions to other FAT filesystems: no ", *, /, :, <, >, ?, \ or |.

Rhythmbox has code to sanitize filenames when transferring to FAT-ish filesystems, but there's a particular problem with exfat at present. There's no blessed in-kernel exfat implementation, the most commonly used one is fuse-exfat, a FUSE implementation. Rhythmbox calls glib which then uses statfs(2) to determine the filesystem type of the target device, and moch says it's not really practical to fix things anywhere in that stack to detect the correct type for FUSE filesystems. So we can't really properly detect exfat mounts and know that we need to sanitize filenames for them, at least until there's an in-kernel exfat implementation, and that may not happen soon or ever.

So, moch suggests instead:

<moch>  rb probably needs to try sanitising filenames for fat-like filesystems when it gets told it can't create a file

i.e., if file creation fails when transferring to a device, try again with a FAT-sanitized filename. Bit inelegant, but it seems like a sane approach, I can't think of a case where it would cause problems.
Comment 1 Adam Williamson 2013-12-10 22:10:29 UTC
I noted that gnome-disks at least is aware the partition is exFAT *somehow*, so it is possible, but it may not be practical for RB to do it however gnome-disks does it. I haven't looked at how gnome-disks does it yet.
Comment 2 Jonathan Matthew 2014-03-08 02:28:08 UTC
gnome-disks looks directly at the block device, which is not possible in rhythmbox.

I've added retry with sanitized name in commit 0a1ea85.
Comment 3 Adam Williamson 2014-09-02 06:06:53 UTC
Well, I just transferred some files with 3.0.3 - which is long after that commit - and it failed on "Would You Fight For My Love?" (track 04 from Lazaretto by Jack White) :/ I checked it didn't just display a failure but retry successfully - there is definitely no matching file on the device.
Comment 4 GNOME Infrastructure Team 2018-05-24 18:04:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/1316.