[gnome-commander] Get the URI string through GIO
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Get the URI string through GIO
- Date: Tue, 20 Jul 2021 18:56:46 +0000 (UTC)
commit 8437c03fad3b000c8a750f940b45496bd333ab35
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon Jul 12 18:15:48 2021 +0200
Get the URI string through GIO
src/gnome-cmd-file-list.cc | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index a38fac60..f3456f3e 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -746,21 +746,12 @@ static char *build_selected_file_list (GnomeCmdFileList *fl, int *file_list_len)
for (auto i = sel_files; i; i = i->next)
{
auto f = static_cast<GnomeCmdFile*> (i->data);
- const gchar *fn = nullptr;
+ auto uriString = f->get_uri_str();
- if (gnome_vfs_uri_is_local (f->get_uri()))
- {
-#ifdef UNESCAPE_LOCAL_FILES
- fn = gnome_vfs_unescape_string (f->get_uri_str(), 0);
-#endif
- }
-
- if (!fn)
- fn = f->get_uri_str();
-
- gchar *uri_str = g_strconcat (fn, "\r\n", nullptr);
+ gchar *uri_str = g_strconcat (uriString, "\r\n", nullptr);
uri_str_list = g_list_append (uri_str_list, uri_str);
total_len += strlen (uri_str);
+ g_free(uriString);
}
// allocate memory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]