diff -x '*.po' -d -urpN libreport.0/src/include/problem_data.h libreport.1/src/include/problem_data.h
--- libreport.0/src/include/problem_data.h	2012-07-10 18:07:42.000000000 +0200
+++ libreport.1/src/include/problem_data.h	2012-07-11 11:11:21.867504301 +0200
@@ -35,7 +35,6 @@ enum {
     /* Show this element in "short" info (report-cli -l) */
     CD_FLAG_LIST          = (1 << 4),
     CD_FLAG_UNIXTIME      = (1 << 5),
-    CD_FLAG_FILE          = (1 << 6),
 };
 
 struct problem_item {
@@ -62,7 +61,6 @@ void add_basics_to_problem_data(problem_
 
 static inline void free_problem_data(problem_data_t *problem_data)
 {
-    //TODO: leaks problem item;
     if (problem_data)
         g_hash_table_destroy(problem_data);
 }
@@ -94,6 +92,8 @@ problem_data_t *create_problem_data_for_
 
 struct dump_dir *create_dump_dir_from_problem_data(problem_data_t *problem_data, const char *base_dir_name);
 
+char* save_dump_dir_from_problem_data(problem_data_t *problem_data, const char *base_dir_name);
+
 #ifdef __cplusplus
 }
 #endif
diff -x '*.po' -d -urpN libreport.0/src/include/report.h libreport.1/src/include/report.h
--- libreport.0/src/include/report.h	2012-07-10 18:07:42.000000000 +0200
+++ libreport.1/src/include/report.h	2012-07-11 10:56:42.210524599 +0200
@@ -37,12 +37,6 @@ enum {
     LIBREPORT_RUN_NEWT    = (1 << 8), /* run 'report-newt' */
 };
 
-typedef enum {
-    LR_OK = 0,
-    LR_MISSING_ITEM = (1 << 1),
-    LR_ERROR        = (1 << 2),
-} LibreportError;
-
 int report_problem_in_dir(const char *dirname, int flags);
 
 /* Reports a problem stored in problem_data_t.
@@ -53,8 +47,6 @@ int report_problem_in_memory(problem_dat
 /* Simple wrapper for trivial uses */
 int report_problem(problem_data_t *pd);
 
-LibreportError save_dump_dir_from_problem_data(problem_data_t *problem_data, char **problem_id, const char *base_dir_name);
-
 #ifdef __cplusplus
 }
 #endif
diff -x '*.po' -d -urpN libreport.0/src/lib/create_dump_dir.c libreport.1/src/lib/create_dump_dir.c
--- libreport.0/src/lib/create_dump_dir.c	2012-07-10 18:07:42.000000000 +0200
+++ libreport.1/src/lib/create_dump_dir.c	2012-07-11 11:18:59.228936241 +0200
@@ -91,39 +91,35 @@ struct dump_dir *create_dump_dir_from_pr
     return dd;
 }
 
-LibreportError save_dump_dir_from_problem_data(problem_data_t *problem_data, char **problem_id, const char *base_dir_name)
+char* save_dump_dir_from_problem_data(problem_data_t *problem_data, const char *base_dir_name)
 {
     char *type = get_problem_item_content_or_NULL(problem_data, FILENAME_TYPE);
 
-    if(!type)
+    if (!type)
     {
         error_msg(_("Missing required item: '%s'"), FILENAME_TYPE);
-        return LR_MISSING_ITEM;
+        return NULL;
     }
 
     char *time_s = get_problem_item_content_or_NULL(problem_data, FILENAME_TIME);
-    if(!time_s)
+    if (!time_s)
     {
-        /* 64 is a randomly picked constant which should be
-         * enough to hold the time in seconds for a long time..
-         */
+        /* time is a required field, so if it's not provided add a default one */
         char buf[sizeof(long unsigned)*3];
         time_t t = time(NULL);
-        /* time is a required field, so if it's not provided add a default one */
-        snprintf(buf, sizeof(buf), "%lu", (long unsigned)t);
+        sprintf(buf, "%lu", (long unsigned)t);
         add_to_problem_data_ext(problem_data, FILENAME_TIME, buf, CD_FLAG_TXT);
     }
 
-    *problem_id = xasprintf("%s-%s-%lu"NEW_PD_SUFFIX, type, iso_date_string(NULL), (long)getpid());
+    char *problem_id = xasprintf("%s-%s-%lu"NEW_PD_SUFFIX, type, iso_date_string(NULL), (long)getpid());
 
-    VERB2 log("Saving to %s/%s", base_dir_name, *problem_id);
-    struct dump_dir *dd = try_dd_create(base_dir_name, *problem_id);
+    VERB2 log("Saving to %s/%s", base_dir_name, problem_id);
+    struct dump_dir *dd = try_dd_create(base_dir_name, problem_id);
     if (!dd)
     {
         perror_msg("Can't create problem directory");
-        free(*problem_id);
-        *problem_id = NULL;
-        return LR_ERROR;
+        free(problem_id);
+        return NULL;
     }
 
     GHashTableIter iter;
@@ -132,17 +128,15 @@ LibreportError save_dump_dir_from_proble
     g_hash_table_iter_init(&iter, problem_data);
     while (g_hash_table_iter_next(&iter, (void**)&name, (void**)&value))
     {
-        if (value->flags & CD_FLAG_FILE)
+        if (value->flags & CD_FLAG_BIN)
         {
-            char dest[PATH_MAX+1];
-            snprintf(dest, sizeof(dest), "%s/%s", dd->dd_dirname, name);
+            char *dest = concat_path_file(dd->dd_dirname, name);
             VERB2 log("copying '%s' to '%s'", value->content, dest);
             off_t copied = copy_file(value->content, dest, 0644);
             if (copied < 0)
                 error_msg("Can't copy %s to %s", value->content, dest);
-
+            free(dest);
             VERB2 log("copied %li bytes", (unsigned long)copied);
-
             continue;
         }
 
@@ -153,34 +147,21 @@ LibreportError save_dump_dir_from_proble
             continue;
         }
 
-//FIXME: what to do with CD_FLAG_BINs??
-        if (value->flags & CD_FLAG_BIN)
-            continue;
-
         dd_save_text(dd, name, value->content);
     }
 
+    problem_id[strlen(problem_id) - strlen(NEW_PD_SUFFIX)] = '\0';
 
-
-    char *suffix = strstr(*problem_id, NEW_PD_SUFFIX);
-    if (suffix)
-        *suffix = '\0';
-
-    char* new_path = concat_path_file(base_dir_name, *problem_id);
-
+    char *new_path = concat_path_file(base_dir_name, problem_id);
     VERB2 log("Renaming from'%s' to '%s'", dd->dd_dirname, new_path);
     if (dd_rename(dd, new_path) != 0)
     {
-        free(new_path);
-        dd_close(dd);
-
-        free(*problem_id);
-        *problem_id = NULL;
-        return LR_ERROR;
+        free(problem_id);
+        problem_id = NULL;
     }
-
     free(new_path);
+
     dd_close(dd);
 
-    return LR_OK;
+    return problem_id;
 }
