]> www.fi.muni.cz Git - evince.git/commitdiff
Change process working directory to $HOME so that we don't prevent
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 10 Apr 2009 14:25:01 +0000 (14:25 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 10 Apr 2009 14:25:01 +0000 (14:25 +0000)
2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/main.c: (main):

Change process working directory to $HOME so that we don't prevent
unmounting in case the initial cwd is on an external device. Fixes
bug #575436.

svn path=/branches/gnome-2-26/; revision=3599

ChangeLog
shell/main.c

index 629d7c024b20739ab44c9abb92135a4c7d201d22..7990a42f66dd13f90d1456e2b25123e03472a800 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/main.c: (main):
+
+       Change process working directory to $HOME so that we don't prevent
+       unmounting in case the initial cwd is on an external device. Fixes
+       bug #575436.
+       
 2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * properties/ev-properties-main.c: (ev_properties_get_pages):
index 17e0f647f9fa9f95041982c9a942f4ea49d46dfb..fef0cb767e8dfe05f3a2fe5c8f3d87142c8401eb 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <glib/gstdio.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
@@ -371,7 +372,7 @@ main (int argc, char *argv[])
                }
        }
 #endif /* ENABLE_DBUS */
-
+       
         if (!ev_init ())
                 return 1;
 
@@ -389,6 +390,11 @@ main (int argc, char *argv[])
                load_files (file_arguments, args);
        g_hash_table_destroy (args);
 
+       /* Change directory so we don't prevent unmounting in case the initial cwd
+        * is on an external device (see bug #575436)
+        */
+       g_chdir (g_get_home_dir ());    
+
        gtk_main ();
 
        ev_shutdown ();