aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-file-helpers.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-20 05:39:01 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-20 05:39:01 +0800
commita43ee535a9b483a7e28abae496854c65a5c25703 (patch)
treed601fa8db6f06170ba30c5c2b0110d73f9ef953c /lib/ephy-file-helpers.c
parent1f991ceea9103d6e4c364e5584d092b1b866b469 (diff)
downloadgsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.gz
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.tar.zst
gsoc2013-epiphany-a43ee535a9b483a7e28abae496854c65a5c25703.zip
Show profile name for mozilla bookmarks, so we can distinguish between
2005-01-19 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-helpers.c: (ephy_find_file_recursive): * src/bookmarks/ephy-bookmarks-editor.c: (add_bookmarks_files), (add_bookmarks_source), (import_dialog_response_cb), (cmd_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.h: Show profile name for mozilla bookmarks, so we can distinguish between different profiles. Don't show firefox bookmarks as mozilla bookmarks. Fixes bug #143982.
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r--lib/ephy-file-helpers.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index bc11f8e27..5be893dc6 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -268,31 +268,34 @@ ephy_ensure_dir_exists (const char *dir)
static void
ephy_find_file_recursive (const char *path,
- const char *fname, GSList **l,
- gint depth, gint maxdepth)
+ const char *fname,
+ GSList **list,
+ gint depth,
+ gint maxdepth)
{
- GDir *d = g_dir_open (path, 0, NULL);
- const gchar *f;
- if (d)
+ GDir *dir;
+ const gchar *file;
+
+ dir = g_dir_open (path, 0, NULL);
+ if (dir != NULL)
{
- while ((f = g_dir_read_name (d)))
+ while ((file = g_dir_read_name (dir)))
{
- char *new_path = g_build_filename (path, f, NULL);
if (depth < maxdepth)
{
- ephy_find_file_recursive (new_path, fname, l,
+ char *new_path = g_build_filename (path, file, NULL);
+ ephy_find_file_recursive (new_path, fname, list,
depth + 1, maxdepth);
+ g_free (new_path);
}
- if (!strcmp (f, fname))
- {
- *l = g_slist_prepend (*l, new_path);
- }
- else
+ if (strcmp (file, fname) == 0)
{
- g_free (new_path);
+ char *new_path = g_build_filename (path, file, NULL);
+ *list = g_slist_prepend (*list, new_path);
}
}
- g_dir_close (d);
+
+ g_dir_close (dir);
}
}