[simple-scan/gnome-3-34] Support saving files to FUSE file systems
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [simple-scan/gnome-3-34] Support saving files to FUSE file systems
- Date: Wed, 15 Apr 2020 23:50:08 +0000 (UTC)
commit 31bd1cc56d54e3da6697b877d52f06679fec8689
Author: Christian Weiske <cweiske cweiske de>
Date: Tue Apr 14 22:18:11 2020 +0200
Support saving files to FUSE file systems
Resolves: https://gitlab.gnome.org/GNOME/simple-scan/-/issues/165
src/app-window.vala | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 02f2072..561c232 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -399,8 +399,8 @@ public class AppWindow : Gtk.ApplicationWindow
if (file_type_combo.get_active_iter (out i))
file_type_store.get (i, 1, out extension, -1);
- var path = save_dialog.get_filename ();
- var filename = Path.get_basename (path);
+ var uri = save_dialog.get_uri ();
+ var filename = Path.get_basename (uri);
/* Replace extension */
var extension_index = filename.last_index_of_char ('.');
@@ -427,14 +427,11 @@ public class AppWindow : Gtk.ApplicationWindow
if (file_type_combo.get_active_iter (out i))
file_type_store.get (i, 1, out extension, -1);
- var path = save_dialog.get_filename ();
- var filename = Path.get_basename (path);
+ var uri = save_dialog.get_uri ();
- var extension_index = filename.last_index_of_char ('.');
+ var extension_index = uri.last_index_of_char ('.');
if (extension_index < 0)
- path += extension;
-
- var uri = File.new_for_path (path).get_uri ();
+ uri += extension;
/* Check the file(s) don't already exist */
var files = new List<File> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]