epiphany r8791 - trunk/src
- From: xan svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8791 - trunk/src
- Date: Tue, 17 Feb 2009 18:19:12 +0000 (UTC)
Author: xan
Date: Tue Feb 17 18:19:12 2009
New Revision: 8791
URL: http://svn.gnome.org/viewvc/epiphany?rev=8791&view=rev
Log:
Fix finding extensions in system dir.
Also use g_build_filename to build paths and plug a leak.
Based on a patch by Diego Escalante Urrelo.
Bug #571379
Modified:
trunk/src/ephy-seed-extension.c
Modified: trunk/src/ephy-seed-extension.c
==============================================================================
--- trunk/src/ephy-seed-extension.c (original)
+++ trunk/src/ephy-seed-extension.c Tue Feb 17 18:19:12 2009
@@ -136,17 +136,19 @@
static gchar *
ephy_seed_extension_get_file (const gchar * name)
{
- gchar *dot_dir, *dot_path, *system_path, *dirname;
+ gchar *dot_path, *system_path, *dirname, *filename;
- dot_dir = g_strconcat (ephy_dot_dir (), "/extensions", NULL);
- dot_path = g_strconcat (dot_dir, "/", name, ".js", NULL);
- g_free (dot_dir);
+ filename = g_strconcat (name, ".js", NULL);
+ dot_path = g_build_filename (ephy_dot_dir(), "extensions", filename, NULL);
if (g_file_test (dot_path, G_FILE_TEST_EXISTS)) {
+ g_free(filename);
return dot_path;
}
+ g_free (dot_path);
- system_path = g_strconcat (EXTENSIONS_DIR, name, NULL);
+ system_path = g_build_filename (EXTENSIONS_DIR, filename, NULL);
+ g_free (filename);
if (g_file_test (system_path, G_FILE_TEST_EXISTS)) {
return system_path;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]