[gimp] libgimp: don't call g_file_new_for_uri() on a path
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: don't call g_file_new_for_uri() on a path
- Date: Tue, 13 Aug 2019 17:11:22 +0000 (UTC)
commit a5cb30173cf64a69fbe92ddd0e674a72b2f4af85
Author: Michael Natterer <mitch gimp org>
Date: Tue Aug 13 19:07:54 2019 +0200
libgimp: don't call g_file_new_for_uri() on a path
in gimp_load_procedure_run() and gimp_save_procedure_run().
libgimp/gimploadprocedure.c | 5 ++++-
libgimp/gimpsaveprocedure.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libgimp/gimploadprocedure.c b/libgimp/gimploadprocedure.c
index 487244138e..0b1259d387 100644
--- a/libgimp/gimploadprocedure.c
+++ b/libgimp/gimploadprocedure.c
@@ -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);
diff --git a/libgimp/gimpsaveprocedure.c b/libgimp/gimpsaveprocedure.c
index b8b41633fb..964860f4e2 100644
--- a/libgimp/gimpsaveprocedure.c
+++ b/libgimp/gimpsaveprocedure.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]