aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/window-commands.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index 94e53474f..3ffc40582 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -347,26 +347,25 @@ window_cmd_file_open (EggAction *action,
dir, NULL, modeOpen,
&file, NULL, NULL);
- if (result == G_OK)
+ uri = gnome_vfs_uri_new (file);
+ if (uri)
{
- uri = gnome_vfs_uri_new (file);
- if (uri)
- {
+ retDir = gnome_vfs_uri_extract_dirname (uri);
- ephy_window_load_url(window, file);
+ /* set default open dir */
+ eel_gconf_set_string (CONF_STATE_OPEN_DIR,
+ retDir);
- retDir = gnome_vfs_uri_extract_dirname (uri);
+ g_free (retDir);
+ gnome_vfs_uri_unref (uri);
- /* set default open dir */
- eel_gconf_set_string (CONF_STATE_OPEN_DIR,
- retDir);
-
- g_free (retDir);
- gnome_vfs_uri_unref (uri);
- }
- g_free (file);
- }
+ if (result == G_OK)
+ {
+ ephy_window_load_url(window, file);
+ }
+ }
+ g_free (file);
g_free (dir);
}