summaryrefslogtreecommitdiff
path: root/src/caja-application.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-09-19 16:15:57 -0400
committerlukefromdc <[email protected]>2018-09-19 16:41:00 -0400
commit336f3510e113356e9eed9a19597f66d7a51dcd24 (patch)
tree77895078cbb211e52e390c54eb4de26c6ed8cd05 /src/caja-application.c
parent6a31ce65e4213d6069e5eb515640233cd27c3937 (diff)
downloadcaja-336f3510e113356e9eed9a19597f66d7a51dcd24.tar.bz2
caja-336f3510e113356e9eed9a19597f66d7a51dcd24.tar.xz
Remove dead code, fix a memory leak
Diffstat (limited to 'src/caja-application.c')
-rw-r--r--src/caja-application.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index befc6133..f4e6c317 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -301,17 +301,15 @@ open_tabs (CajaApplication *application,
uri = g_file_get_uri (locations[0]);
g_debug ("Opening new tab at uri %s\n", uri);
caja_window_go_to (window, locations[0]);
+ g_free (uri);
for (int i = 1; i< n_files;i++) {
/* open tabs in reverse order because each
* tab is opened before the previous one */
guint tab = n_files-i;
uri = g_file_get_uri (locations[tab]);
g_debug ("Opening new tab at uri %s\n", uri);
- if (i == 0) {
- caja_window_go_to (window, locations[tab]);
- } else {
- caja_window_go_to_tab (window, locations[tab]);
- }
+ caja_window_go_to_tab (window, locations[tab]);
+ g_free (uri);
}
if (geometry != NULL && !gtk_widget_get_visible (GTK_WIDGET (window))) {
@@ -324,8 +322,6 @@ open_tabs (CajaApplication *application,
APPLICATION_WINDOW_MIN_HEIGHT,
FALSE);
}
-
- g_free (uri);
}
static void
@@ -2225,10 +2221,6 @@ caja_application_local_command_line (GApplication *application,
}
g_application_open (application, files, len, concatOptions);
g_free (concatOptions);
- } else {
- if (len > 0) {
- g_application_open (application, files, len, "");
- }
}
for (idx = 0; idx < len; idx++) {