summaryrefslogtreecommitdiff
path: root/src/cgg.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2011-01-23 10:56:14 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2011-01-23 10:56:14 +0100
commit7df97fbe8fa93141e7922a95f5ce0f9254bf41ab (patch)
tree84c519692470b7a597f72acc2614d9d85bfa8ff6 /src/cgg.c
parentbb58d822fb517f4a7a242994bbda3693255b2c74 (diff)
downloadcataract-7df97fbe8fa93141e7922a95f5ce0f9254bf41ab.tar.xz
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.
Diffstat (limited to 'src/cgg.c')
-rw-r--r--src/cgg.c10
1 files changed, 9 insertions, 1 deletions
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) {