summaryrefslogtreecommitdiff
path: root/lib/ephy-file-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r--lib/ephy-file-helpers.c7
1 files changed, 7 insertions, 0 deletions
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)