Skip to content

Commit

Permalink
Remove dead code, fix a memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
lukefromdc committed Sep 19, 2018
1 parent 6a31ce6 commit 336f351
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/caja-application.c
Expand Up @@ -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))) {
Expand All @@ -324,8 +322,6 @@ open_tabs (CajaApplication *application,
APPLICATION_WINDOW_MIN_HEIGHT,
FALSE);
}

g_free (uri);
}

static void
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 336f351

Please sign in to comment.