[epiphany/gnome-3-26] flatpak: Ignore download directory gsetting



commit 6a29bf5d24f2a0e0adca69f8aefa8990441c5802
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 |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 99e85fb..617edb0 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_str_equal (download_dir, "Desktop"))
-    download_dir = ephy_file_desktop_dir ();
-  if (g_str_equal (download_dir, "Downloads") ||
-      g_path_is_absolute (download_dir) != TRUE)
+  if (!g_strcmp0 (download_dir, "Downloads") ||
+      !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]