char **update_md_paths; /*!< list of paths to repositories which should
be used for update */
gboolean skip_stat; /*!< skip stat() call during --update */
- gboolean split; /*!< generate split media */
+ gboolean split; /*!< generate split media */
gboolean version; /*!< print program version */
gboolean database; /*!< create sqlite database metadata */
gboolean no_database; /*!< do not create database */
GQueue *sub_dirs = g_queue_new();
gchar *input_dir_stripped;
-
input_dir_stripped = g_string_chunk_insert_len(sub_dirs_chunk,
in_dir,
in_dir_len-1);
task->path = g_strdup(dirname);
if (output_pkg_list)
fprintf(output_pkg_list, "%s\n", repo_relative_path);
-
*current_pkglist = g_slist_prepend(*current_pkglist, task->filename);
-
// TODO: One common path for all tasks with the same path?
g_queue_insert_sorted(&queue, task, task_cmp, NULL);
} else {
in_dir = cr_normalize_dir_path(argv[1]);
}
+ // Check if inputdir exists
if (!g_file_test(in_dir, G_FILE_TEST_IS_DIR)) {
g_printerr("Directory %s must exist\n", in_dir);
g_free(in_dir);
if (!prepare_cache_dir(cmd_options, out_dir, &tmp_err)) {
g_printerr("%s\n", tmp_err->message);
g_error_free(tmp_err);
-
g_free(in_dir);
g_free(in_repo);
g_free(out_dir);
exit(EXIT_FAILURE);
}
- // Check if inputdir exists
// Block signals that terminates the process
if (!cr_block_terminating_signals(&tmp_err)) {
g_printerr("%s\n", tmp_err->message);
output_pkg_list = fopen(cmd_options->read_pkgs_list, "w");
if (!output_pkg_list) {
g_critical("Cannot open \"%s\" for writing: %s",
- cmd_options->read_pkgs_list, g_strerror(errno));
+ cmd_options->read_pkgs_list, g_strerror(errno));
exit(EXIT_FAILURE);
}
}
g_free(in_repo);
g_free(out_repo);
g_free(tmp_out_repo);
-// TODO M0ses: g_free must be done inside loop
g_free(in_dir);
g_free(out_dir);
g_free(lock_dir);