summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2009-03-19 20:04:14 +0000
committerChristian Persch <chpe@src.gnome.org>2009-03-19 20:04:14 +0000
commit7dbe33b5bfd99ff4ef116f8ccf4777edd8ade788 (patch)
treee591afaa4f5882441f6f0ac29c179e90770d823c
parentbbe0f743761680f2da2a47a23c728506a02bff91 (diff)
downloadepiphany-7dbe33b5bfd99ff4ef116f8ccf4777edd8ade788.tar.gz
Chdir to / in the factory, so we don't hog any mountpoints.
svn path=/branches/gnome-2-26/; revision=8923
-rw-r--r--lib/ephy-file-chooser.c2
-rw-r--r--lib/ephy-file-helpers.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index a23d99320..4c6b5783d 100644
--- a/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 ());
}
static GObject *
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index b3ba240dd..8864cbe83 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -23,6 +23,8 @@
#include "config.h"
+#include <unistd.h>
+
#include "ephy-file-helpers.h"
#include "ephy-prefs.h"
@@ -31,6 +33,7 @@
#include "ephy-string.h"
#include <glib.h>
+#include <glib/gstdio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
@@ -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));
+
/* See if we've been calling ourself, and abort if we have */
uuid = g_getenv (EPHY_UUID_ENVVAR);
if (uuid && strcmp (uuid, EPHY_UUID) == 0)