From: Jan Engelhardt Date: Sun, 29 Jul 2012 18:25:21 +0000 (+0200) Subject: ply-text-progress-bar: strip quotes if present X-Git-Tag: 0.8.7~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96d8d38698b8bb05b7a1541f2cffd63a478e2bd4;p=thirdparty%2Fplymouth.git ply-text-progress-bar: strip quotes if present The syntax for sysconfig-style files allows for quotes. --- diff --git a/src/libply-splash-core/ply-text-progress-bar.c b/src/libply-splash-core/ply-text-progress-bar.c index 7c9d688c..bf4b3781 100644 --- a/src/libply-splash-core/ply-text-progress-bar.c +++ b/src/libply-splash-core/ply-text-progress-bar.c @@ -137,6 +137,14 @@ get_os_string (void) if (pos2 != NULL) *pos2 = '\0'; + if ((*pos == '\"' && pos2[-1] == '\"') || + (*pos == '\'' && pos2[-1] == '\'')) + { + pos++; + pos2--; + + *pos2 = '\0'; + } asprintf (&os_string, " %s", pos); } goto out;