[nautilus] file-utilities: fix leaked path string
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-utilities: fix leaked path string
- Date: Fri, 24 Aug 2012 16:44:57 +0000 (UTC)
commit 523073f86b983f2fa21c8a9b579c58df0293e081
Author: Pavel Vasin <rat4vier gmail com>
Date: Fri Aug 24 15:14:19 2012 +0400
file-utilities: fix leaked path string
https://bugzilla.gnome.org/show_bug.cgi?id=682603
libnautilus-private/nautilus-file-utilities.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 22ccd00..8cb3359 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -748,13 +748,25 @@ nautilus_find_existing_uri_in_hierarchy (GFile *location)
return location;
}
+static gboolean
+have_program_in_path (const char *name)
+{
+ gchar *path;
+ gboolean result;
+
+ path = g_find_program_in_path (name);
+ result = (path != NULL);
+ g_free (path);
+ return result;
+}
+
gboolean
nautilus_is_file_roller_installed (void)
{
static int installed = - 1;
if (installed < 0) {
- if (g_find_program_in_path ("file-roller")) {
+ if (have_program_in_path ("file-roller")) {
installed = 1;
} else {
installed = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]