After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644641 - Epiphany 2.91.91 does not respect XDG settings
Epiphany 2.91.91 does not respect XDG settings
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Downloads
2.91.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-13 14:12 UTC by Maciej (Matthew) Piechotka
Modified: 2011-03-31 06:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use XDG download directory by default (2.08 KB, patch)
2011-03-16 07:10 UTC, Alexandre Mazari
accepted-commit_now Details | Review
Use XDG download directory by default (1.31 KB, patch)
2011-03-17 10:25 UTC, Alexandre Mazari
none Details | Review
download.diff (1.57 KB, patch)
2011-03-30 22:10 UTC, Xan Lopez
accepted-commit_now Details | Review

Description Maciej (Matthew) Piechotka 2011-03-13 14:12:32 UTC
% xdg-user-dir DOWNLOAD
/home/mpiechotka/Desktop/Downloads

Directory is correctly marked by nautilus but epiphany started downloading into $HOME/Desktop.
Comment 1 Alexandre Mazari 2011-03-16 07:10:57 UTC
Created attachment 183490 [details] [review]
Use XDG download directory by default

Fix
Comment 2 Gustavo Noronha (kov) 2011-03-16 23:28:49 UTC
Review of attachment 183490 [details] [review]:

Great!

::: lib/ephy-file-helpers.c
@@ +161,2 @@
+        /* If we don't have XDG user dirs info, return an educated guess. */
+        return g_build_filename (g_get_home_dir (), _("Desktop"), NULL);

Indentation fix could go in a different patch I think.
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2011-03-17 07:34:58 UTC
Review of attachment 183490 [details] [review]:

Looks good, thanks.

::: lib/ephy-file-helpers.c
@@ +161,2 @@
+        /* If we don't have XDG user dirs info, return an educated guess. */
+        return g_build_filename (g_get_home_dir (), _("Desktop"), NULL);

It should :-)
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2011-03-17 07:35:33 UTC
(In reply to comment #3)
> Review of attachment 183490 [details] [review]:
> 
> Looks good, thanks.
> 
> ::: lib/ephy-file-helpers.c
> @@ +161,2 @@
> +        /* If we don't have XDG user dirs info, return an educated guess. */
> +        return g_build_filename (g_get_home_dir (), _("Desktop"), NULL);
> 
> It should :-)

Err... I meant: Yes, re-indent should go in a different patch.
Comment 5 Alexandre Mazari 2011-03-17 10:25:58 UTC
Created attachment 183614 [details] [review]
Use XDG download directory by default

Fix for
Comment 6 Xan Lopez 2011-03-30 22:10:10 UTC
Created attachment 184745 [details] [review]
download.diff

This patch actually respects our documented behavior :p
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2011-03-30 22:15:05 UTC
Review of attachment 184745 [details] [review]:

fre-fre-fre-fre-freeeeeeeeze break.
Comment 8 Matthias Clasen 2011-03-30 22:33:25 UTC
Review of attachment 184745 [details] [review]:

::: lib/ephy-file-helpers.c
@@ +139,3 @@
+	if (g_str_equal (download_dir, "Downloads"))
+		download_dir = ephy_file_download_dir ();
+	else if (g_str_equal (download_dir, "Desktop") || g_path_is_absolute (download_dir) != TRUE)

Are you missing a  ! there ? I think it should be !g_path_is_absolute ?
Comment 9 Xan Lopez 2011-03-30 22:43:54 UTC
(In reply to comment #8)
> Review of attachment 184745 [details] [review]:
> 
> ::: lib/ephy-file-helpers.c
> @@ +139,3 @@
> +    if (g_str_equal (download_dir, "Downloads"))
> +        download_dir = ephy_file_download_dir ();
> +    else if (g_str_equal (download_dir, "Desktop") || g_path_is_absolute
> (download_dir) != TRUE)
> 
> Are you missing a  ! there ? I think it should be !g_path_is_absolute ?

Mmm, the code does g_path_is_absolute (download_dir) != TRUE, so we'll use the Desktop dir if the path is not absolute. Seems OK to me.
Comment 10 Xan Lopez 2011-03-31 05:43:21 UTC
Fixed in master, will be in 3.0.