]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-text-progress-bar: strip quotes if present
authorJan Engelhardt <jengelh@inai.de>
Sun, 29 Jul 2012 18:25:21 +0000 (20:25 +0200)
committerRay Strode <rstrode@redhat.com>
Mon, 30 Jul 2012 20:14:55 +0000 (16:14 -0400)
The syntax for sysconfig-style files allows for quotes.

src/libply-splash-core/ply-text-progress-bar.c

index 7c9d688c30e0effac1c5784d791f2594894ca56b..bf4b37810a94bff8d25e68a1cbbd58ca12156657 100644 (file)
@@ -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;