Commit a5cb3017 authored by Michael Natterer's avatar Michael Natterer 😴

libgimp: don't call g_file_new_for_uri() on a path

in gimp_load_procedure_run() and gimp_save_procedure_run().
parent 7e99aa59
......@@ -178,7 +178,10 @@ gimp_load_procedure_run (GimpProcedure *procedure,
uri = g_value_get_string (gimp_value_array_index (args, 1));
/* raw_uri = g_value_get_string (gimp_value_array_index (args, 2)); */
file = g_file_new_for_uri (uri);
if (gimp_file_procedure_get_handles_uri (GIMP_FILE_PROCEDURE (procedure)))
file = g_file_new_for_uri (uri);
else
file = g_file_new_for_path (uri);
remaining = gimp_value_array_new (gimp_value_array_length (args) - 3);
......
......@@ -165,7 +165,10 @@ gimp_save_procedure_run (GimpProcedure *procedure,
uri = g_value_get_string (gimp_value_array_index (args, 3));
/* raw_uri = g_value_get_string (gimp_value_array_index (args, 4)); */
file = g_file_new_for_uri (uri);
if (gimp_file_procedure_get_handles_uri (GIMP_FILE_PROCEDURE (procedure)))
file = g_file_new_for_uri (uri);
else
file = g_file_new_for_path (uri);
remaining = gimp_value_array_new (gimp_value_array_length (args) - 5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment