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

in gimp_load_procedure_run() and gimp_save_procedure_run().
This commit is contained in:
Michael Natterer 2019-08-13 19:07:54 +02:00
parent 7e99aa59f5
commit a5cb30173c
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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);