]> wimlib.net Git - wimlib/blobdiff - programs/imagex.c
Implement wimlib_iterate_dir_tree()
[wimlib] / programs / imagex.c
index 15f68d1aa9fb1c330836f25975e176796efb3f3d..114424e396d09630e7b4f183cfeedd8c3dd185d2 100644 (file)
@@ -1968,6 +1968,13 @@ out:
        return ret;
 }
 
+static int
+print_full_path(const struct wimlib_wim_dentry *wdentry, void *_ignore)
+{
+       tprintf(T("%"TS"\n"), wdentry->full_path);
+       return 0;
+}
+
 /* Print the files contained in an image(s) in a WIM file. */
 static int
 imagex_dir(int argc, tchar **argv)
@@ -2014,7 +2021,9 @@ imagex_dir(int argc, tchar **argv)
                image = 1;
        }
 
-       ret = wimlib_print_files(w, image);
+       ret = wimlib_iterate_dir_tree(w, image, T(""),
+                                     WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE,
+                                     print_full_path, NULL);
 out:
        wimlib_free(w);
        return ret;