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 583616 - Download location reset when preferences dialog opened
Download location reset when preferences dialog opened
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Preferences
2.26.x
Other All
: Normal major
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 586583 591536 597316 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-05-23 03:30 UTC by Tim Fisken
Modified: 2010-01-14 19:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Tim Fisken 2009-05-23 03:30:48 UTC
Please describe the problem:
Whenever the preferences dialog is opened, the download location is reset to "/" (displayed as "Filesystem"). If the folder is changed and the dialog closed, this change persists, but only until the next time the preferences folder is opened.

Steps to reproduce:
1. Open preferences dialog
2. Change "Download folder" to something other than "Filesystem"
3. Close preferences dialog
4. Open preferences dialog again


Actual results:
When the preference dialog re-opens, "Download folder" is set to "Filesystem," and the conf setting "/apps/epiphany/directories/downloads_folder" is set to "/"

Expected results:
The setting in the dialog and and gconf should be the same after the dialog is opened as it was before.

Does this happen every time?
Yes

Other information:
Comment 1 Tim Fisken 2009-05-23 03:59:19 UTC
Trying to track down the problem, I changed line 1383 in prefs-dialog.c to call gtk_file_chooser_dialog_new rather than ephy_file_chooser_new. The problem no longer occurs when using gtk_file_chooser_dialog_new.
Comment 2 Adam Schmalhofer 2009-05-30 09:34:58 UTC
This happens even if the checkbox "Automatically download and open files" is not checked and the "Download folder" combo box is deactivated. (Note that the combo box shouldn't be deactivated because this setting is needed for shift-click/download link). It also effects the third party extension "video downloader" (disclaimer: I'm the developer of this extension).
Comment 3 Reinout van Schouwen 2009-05-30 12:15:59 UTC
(In reply to comment #2)
> This happens even if the checkbox "Automatically download and open files" is
> not checked and the "Download folder" combo box is deactivated. (Note that the
> combo box shouldn't be deactivated because this setting is needed for
> shift-click/download link)

IIRC, the XDG download directory is used in the latter case.
Comment 4 Adam Schmalhofer 2009-05-30 12:56:33 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This happens even if the checkbox "Automatically download and open files" is
> > not checked and the "Download folder" combo box is deactivated. (Note that the
> > combo box shouldn't be deactivated because this setting is needed for
> > shift-click/download link)
> 
> IIRC, the XDG download directory is used in the latter case.

Well, guess that is an other bug:

$ cat user-dirs.dirs
[...]
XDG_DOWNLOAD_DIR="$HOME/"
[...]
$ epiphany gnome.org

Then: Open Preferences; set Download folder to "Desktop"; uncheck "Automatically download and open files"; close Preferences; shift-click on link

=> apears on Desktop (tried with different folder, too).


Comment 5 Reinout van Schouwen 2009-08-12 08:09:32 UTC
*** Bug 586583 has been marked as a duplicate of this bug. ***
Comment 6 Reinout van Schouwen 2009-08-12 08:09:43 UTC
*** Bug 591536 has been marked as a duplicate of this bug. ***
Comment 7 Gustavo Noronha (kov) 2009-08-21 20:22:07 UTC
I can reproduce the problem with epiphany 2.26.x, but I can't reproduce this problem with master. Can anyone please try to reproduce with 2.27.x and let us know what happens? Also, what distributions are the people who can reproduce the problem use?
Comment 8 Kahlil Robinson 2009-08-22 03:05:23 UTC
I'm running 2.26.3 on Gentoo x86_64.
Comment 9 Reinout van Schouwen 2009-08-23 12:13:31 UTC
(In reply to comment #7)
> I can reproduce the problem with epiphany 2.26.x, but I can't reproduce this
> problem with master. Can anyone please try to reproduce with 2.27.x and let us
> know what happens? 

I can't reproduce with 2.27.90...
Comment 10 Fabio Durán Verdugo 2009-10-04 16:16:09 UTC
*** Bug 597316 has been marked as a duplicate of this bug. ***
Comment 11 Gilles Dartiguelongue 2009-11-15 15:26:39 UTC
I guess the preference dialog code hasn't changed much with the gecko -> webkit transition, maybe bissecting the issue would point to the patch that fixed the issue.
Comment 12 Reinout van Schouwen 2009-12-19 17:12:42 UTC
I'm considering this bug fixed now, please feel free to reopen if you can still reproduce it on epiphany 2.28+.
Comment 13 Pacho Ramos 2010-01-03 13:47:41 UTC
One more thing, this bug is solved in 2.28 simply because the following commit was magically dropped:
http://git.gnome.org/browse/epiphany/commit/?h=gnome-2-26&id=7dbe33b5bfd99ff4ef116f8ccf4777edd8ade788

(except +#include <unistd.h>)

that commit for fixing something related with preventing "hog of any mountpoints" is causing this issue in 2.26 and doesn't cause it in 2.28 because it was not included, is this expected? I mean, would be safe for us downstream to simply drop that commit?

Thanks
Comment 14 Diego Escalante Urrelo (not reading bugmail) 2010-01-14 04:49:38 UTC
Pacho I think it /might/ be related to some gvfs thing or something. Just make sure it doesn't /hog any mountpoint/ and backport it. IMHO.
Comment 15 Diego Escalante Urrelo (not reading bugmail) 2010-01-14 04:50:02 UTC
I meant old gnome-vfs by "some gvfs" (can't really recall what 2.26 used).
Comment 16 Pacho Ramos 2010-01-14 19:13:08 UTC
If I don't misremember, epiphany 2.26 already uses gvfs because it caused other problems since gecko is still using gnome-vfs, causing unproper apps being opened by default when downloading and opening files (but it was a different problem)

The problem is that I am not a programer, then, I don't know why http://git.gnome.org/browse/epiphany/commit/?h=gnome-2-26&id=7dbe33b5bfd99ff4ef116f8ccf4777edd8ade788 commit breaks 2.26 branch causing download directory to become "/" everytime preferences window is opened :-(
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2010-01-14 19:26:09 UTC
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -127,6 +127,8 @@ static void
ephy_file_chooser_init (EphyFileChooser *dialog)
{
dialog->priv = EPHY_FILE_CHOOSER_GET_PRIVATE (dialog);
+
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_get_home_dir ());
}

When opening a new file chooser, set the current dir to user's home dir.

+++ b/lib/ephy-file-helpers.c
@@ -261,6 +264,10 @@ ephy_file_helpers_init (const char *profile_dir,
{
const char *uuid;
+ /* Make sure the server process doesn't hog any mountpoints! */
+ if (chdir ("/") < 0)
+ g_warning ("Failed to chdir to /: %s", g_strerror (errno));
+

If you run a program with /some/mountpoint as the current working dir, it will lock that mountpoint until it finishes running. So this is a hack to make the running dir be '/' no matter which was the original.

It's safe to revert in your package as long as you confirm the mountpoint locking is not happening in your build.
Comment 18 Pacho Ramos 2010-01-14 19:39:05 UTC
(In reply to comment #17)
> +++ b/lib/ephy-file-helpers.c
> @@ -261,6 +264,10 @@ ephy_file_helpers_init (const char *profile_dir,
> {
> const char *uuid;
> + /* Make sure the server process doesn't hog any mountpoints! */
> + if (chdir ("/") < 0)
> + g_warning ("Failed to chdir to /: %s", g_strerror (errno));
> +
> 
> If you run a program with /some/mountpoint as the current working dir, it will
> lock that mountpoint until it finishes running. So this is a hack to make the
> running dir be '/' no matter which was the original.
> 
> It's safe to revert in your package as long as you confirm the mountpoint
> locking is not happening in your build.

Sorry but, how could I check it? I am unable to know what does "run a program with mountpoint as working dir" from epiphany :'-( (I have also been unable of finding a bug reporting that issue for having some thoughts about how could I check it) 

If you don't have time, don't worry, I understand that you probably have more important things to do