[epiphany] flatpak: Ignore download directory gsetting



commit de845accba502a001ea8fec1f9a7b1a8bbfdbc34
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Oct 4 16:05:27 2017 +0200

    flatpak: Ignore download directory gsetting
    
    We always need to download into ~/Downloads

 lib/ephy-file-helpers.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 249cf06..4cc925c 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -25,6 +25,7 @@
 #include "ephy-file-helpers.h"
 
 #include "ephy-debug.h"
+#include "ephy-flatpak-utils.h"
 #include "ephy-prefs.h"
 #include "ephy-profile-utils.h"
 #include "ephy-settings.h"
@@ -141,11 +142,12 @@ ephy_file_get_downloads_dir (void)
   download_dir = g_settings_get_string (EPHY_SETTINGS_STATE,
                                         EPHY_PREFS_STATE_DOWNLOAD_DIR);
 
-  if (!g_strcmp0 (download_dir, "Desktop"))
-    download_dir = ephy_file_desktop_dir ();
   if (!g_strcmp0 (download_dir, "Downloads") ||
-      g_path_is_absolute (download_dir) != TRUE)
+      !g_path_is_absolute (download_dir) ||
+      ephy_is_running_inside_flatpak ())
     download_dir = ephy_file_download_dir ();
+  else if (!g_strcmp0 (download_dir, "Desktop"))
+    download_dir = ephy_file_desktop_dir ();
 
   return download_dir;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]