GNOME Bugzilla – Bug 414859
Missing forbidden characters in strip_chars
Last modified: 2007-12-19 09:51:59 UTC
From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230879: Description of problem: If the character < is part of a track filename and strip special characters is selected in options, sound-juicer will fail to replace the < character with a _ character. Instead a is inserted. Causes Rip to fail if ripping to VFAT file system. Version-Release number of selected component (if applicable): 2.16.3 How reproducible: Every time. Steps to Reproduce: 1. In preferences, select a folder on a VFAT partition as your Music Folder. 2. Insert the < character into any track name(anywhere) 3. Hit enter. 4. Click on extract. Actual results: Sound Juicer could not extract this CD. Reason: Could not open vfs file "file:///home/Gamma9/storage/Ottmar_Liebert___Luna_Negra/Rumba_Collection_Greatest_Hits_1992-1997/01_-_g s.flac" for writing: Invalid parameters. Then on closing above dialog box: Sound Juicer could not extract this CD. Reason: Error starting ripping pipeline And closing above dialog causes program to exit. Expected results: Should extract file to "file:///home/Gamma9/storage/Ottmar_Liebert___Luna_Negra/Rumba_Collection_Greatest_Hits_1992-1997/01_-_g _s.flac
Created attachment 83951 [details] [review] sound-juicer-missing-forbidden-chars.patch Adding missing characters to the list of chars to replace: < and G_DIR_SEPARATOR_S
I think the patch should replace "/" with G_DIR_SEPARATOR_S, not append. On Unix that expands to "//" and on Windows (assuming SJ ever gets ported) it would mean that / is replaced, when it is valid. The other change look good and I'll commit once we're out of code freeze.
(In reply to comment #2) > I think the patch should replace "/" with G_DIR_SEPARATOR_S, not append. > > On Unix that expands to "//" and on Windows (assuming SJ ever gets ported) it > would mean that / is replaced, when it is valid. There's already something to replace backslashes at: g_strdelimit (s, "\\:|", '-'); Maybe it should also replace slashes (both are forbidden on vfat). I wish the strip chars was more in tune with whatever characters were allowed on the destination filesystem (or that we could select whether we want to make the file available on other OSes).
There is a bug somewhere to do a stat on the target directory and look at the filesystem type, so that the replace list can be different for ext3 and vfat mount points. Patches welcome. :) Obviously, this is critical for the success of GNOME on the enterprise desktop.
*** This bug has been marked as a duplicate of 321436 ***