]> wimlib.net Git - wimlib/blobdiff - src/dentry.c
implement WIMLIB_INIT_FLAG_ASSUME_UTF8
[wimlib] / src / dentry.c
index 97ad628f8a5df7ef5f3d27eac864aa4d40f4db4c..e9826b55d1e4f1ae9911e1b5dcdf0d793a1e0489 100644 (file)
@@ -275,7 +275,7 @@ for_dentry_in_tree_depth(struct wim_dentry *root,
 
 /* Calculate the full path of @dentry.  The full path of its parent must have
  * already been calculated, or it must be the root dentry. */
-static int
+int
 calculate_dentry_full_path(struct wim_dentry *dentry)
 {
        tchar *full_path;
@@ -573,12 +573,12 @@ get_parent_dentry(WIMStruct *w, const tchar *path)
 int
 print_dentry_full_path(struct wim_dentry *dentry, void *_ignore)
 {
-       tchar *full_path = dentry_full_path(dentry);
-       if (!full_path)
-               return WIMLIB_ERR_NOMEM;
-       tprintf(T("%"TS"\n"), full_path);
-       FREE(full_path);
-       dentry->_full_path = 0;
+       int ret = calculate_dentry_full_path(dentry);
+       if (ret)
+               return ret;
+       tprintf(T("%"TS"\n"), dentry->_full_path);
+       FREE(dentry->_full_path);
+       dentry->_full_path = NULL;
        dentry->full_path_nbytes = 0;
        return 0;
 }