diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2012-08-22 12:06:29 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2012-09-01 20:30:06 +0200 |
commit | 51a53586efb2f9837a4b62d05492b017442aae8e (patch) | |
tree | 66cb393eb50111f345243a0fb8b510f0d73cc2e8 | |
parent | 467e8e755e525b35f2baaf8ac2f1607e0b4a92cf (diff) |
Sanitize disc number if requiredcomposer
When the file name is set to 'Disc d - t ...' it should be sanitized
in case the user has requested the removal of spaces from the file
name.
https://bugzilla.gnome.org/show_bug.cgi?id=661646
-rw-r--r-- | src/sj-extracting.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sj-extracting.c b/src/sj-extracting.c index 77871d5..820e35c 100644 --- a/src/sj-extracting.c +++ b/src/sj-extracting.c @@ -1160,7 +1160,9 @@ filepath_parse_pattern (const char* pattern, const TrackDetails *track) case 'n': /* Disc and track number */ if (track->album->disc_number > 0) { - string = g_strdup_printf ("Disc %d - %d", track->album->disc_number, track->number); + char *s = g_strdup_printf ("Disc %d - %d", track->album->disc_number, track->number); + string = sanitize_path (s, filesystem_type); /* strip spaces if required */ + g_free (s); } else { string = g_strdup_printf ("%d", track->number); } |