]> wimlib.net Git - wimlib/commitdiff
do_wimlib_extract_paths(): Adjust condition to make target dir
authorEric Biggers <ebiggers3@gmail.com>
Fri, 17 Jan 2014 07:47:53 +0000 (01:47 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 17 Jan 2014 07:47:59 +0000 (01:47 -0600)
Don't make the target directory if called from wimlib_extract_files(),
since in that case the tree itself will be extracted to the target.

src/extract.c

index 311ed97d65c27efbd64fc2a79f82a502855da57c..2b347029d31a58ba02f890c4d782064f51e10fd3 100644 (file)
@@ -2634,7 +2634,8 @@ do_wimlib_extract_paths(WIMStruct *wim,
                return ret;
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_NTFS |
                return ret;
 
        if ((extract_flags & (WIMLIB_EXTRACT_FLAG_NTFS |
-                             WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE)) ==
+                             WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE |
+                             WIMLIB_EXTRACT_FLAG_FILEMODE)) ==
            (WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE))
        {
                ret = mkdir_if_needed(target);
            (WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE))
        {
                ret = mkdir_if_needed(target);