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 414859 - Missing forbidden characters in strip_chars
Missing forbidden characters in strip_chars
Status: RESOLVED DUPLICATE of bug 321436
Product: sound-juicer
Classification: Applications
Component: ripping
git master
Other Linux
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-05 10:44 UTC by Bastien Nocera
Modified: 2007-12-19 09:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sound-juicer-missing-forbidden-chars.patch (752 bytes, patch)
2007-03-05 10:45 UTC, Bastien Nocera
needs-work Details | Review

Description Bastien Nocera 2007-03-05 10:44:48 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
Comment 1 Bastien Nocera 2007-03-05 10:45:48 UTC
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
Comment 2 Ross Burton 2007-03-05 10:53:34 UTC
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.
Comment 3 Bastien Nocera 2007-03-05 11:04:44 UTC
(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).
Comment 4 Ross Burton 2007-03-05 11:11:32 UTC
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.
Comment 5 Ross Burton 2007-12-19 09:51:59 UTC

*** This bug has been marked as a duplicate of 321436 ***