From 7df97fbe8fa93141e7922a95f5ce0f9254bf41ab Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 23 Jan 2011 10:56:14 +0100 Subject: Consolidate paths in a separate struct This will allow us to pass detailed path info to worker methods. Each path info instance is bound to a currently processed album and directory. Possibly move to struct TItems in the future. --- src/cgg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/cgg.c') diff --git a/src/cgg.c b/src/cgg.c index c158dfd..f295077 100644 --- a/src/cgg.c +++ b/src/cgg.c @@ -108,6 +108,7 @@ main (int argc, char* argv[]) time_t time_start = time (NULL); time_t time_stop; gchar *s; + TPathInfo *path_info; /* * this initialize the library and check potential ABI mismatches @@ -169,7 +170,14 @@ main (int argc, char* argv[]) setup->verbose = verbose; setup->update_mode = update; setup->override_nofullsize = fullsize; - build_tree (setup, source_dir, dst_dir, NULL, -1, jobs); + + path_info = g_malloc0 (sizeof (TPathInfo)); + path_info->source_root = g_strdup (source_dir); + path_info->src_dir = g_strdup (source_dir); + path_info->dest_root = g_strdup (dst_dir); + path_info->dest_dir = g_strdup (dst_dir); + build_tree (setup, path_info, NULL, -1, jobs); + free_path_info (path_info); /* Write feeds */ if (news_feed) { -- cgit v1.2.3