[simple-scan/gnome-3-36] 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-36] Support saving files to FUSE file systems
- Date: Tue, 14 Apr 2020 23:31:43 +0000 (UTC)
commit 6c95fca1382d78d3afc3e90c096e1b6188c670e3
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 6f2d353..f6c3093 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -550,8 +550,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 ('.');
@@ -578,14 +578,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]