GNOME Bugzilla – Bug 644641
Epiphany 2.91.91 does not respect XDG settings
Last modified: 2011-03-31 06:03:30 UTC
% xdg-user-dir DOWNLOAD /home/mpiechotka/Desktop/Downloads Directory is correctly marked by nautilus but epiphany started downloading into $HOME/Desktop.
Created attachment 183490 [details] [review] Use XDG download directory by default Fix
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.
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 :-)
(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.
Created attachment 183614 [details] [review] Use XDG download directory by default Fix for
Created attachment 184745 [details] [review] download.diff This patch actually respects our documented behavior :p
Review of attachment 184745 [details] [review]: fre-fre-fre-fre-freeeeeeeeze break.
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 ?
(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.
Fixed in master, will be in 3.0.