app: use gimp_config_writer_string() to output the mypaint-brush-path

so it is properly escaped.
This commit is contained in:
Michael Natterer 2018-03-31 11:28:12 +02:00
parent 2aa4426d4f
commit 7be2d1457c
1 changed files with 14 additions and 8 deletions

View File

@ -173,12 +173,15 @@ dump_gimprc_system (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
"~/.mypaint/brushes",
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_open (writer, "mypaint-brush-path");
gimp_config_writer_printf (writer,
"\"@mypaint_brushes_dir@%s"
"~/.mypaint/brushes\"",
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_string (writer, path);
gimp_config_writer_close (writer);
g_free (path);
}
else
{
@ -326,13 +329,16 @@ dump_gimprc_manpage (GimpConfig *rc,
}
else if (! strcmp (prop_spec->name, "mypaint-brush-path"))
{
gchar *path = g_strdup_printf ("@mypaint_brushes_dir@%s"
"~/.mypaint/brushes",
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_open (writer, "mypaint-brush-path");
gimp_config_writer_printf (writer,
"\"@mypaint_brushes_dir@%s"
"~/.mypaint/brushes\"",
G_SEARCHPATH_SEPARATOR_S);
gimp_config_writer_string (writer, path);
gimp_config_writer_close (writer);
g_free (path);
success = TRUE;
}
else