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 311ed97..2b34702 100644 (file)
@@ -2634,7 +2634,8 @@ do_wimlib_extract_paths(WIMStruct *wim,
                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);