]> wimlib.net Git - wimlib/blobdiff - src/mount.c
Alternate stream entries fixes
[wimlib] / src / mount.c
index f3043c2b5a7e26f910d9c4f51840290fd9e416d1..c6ce55885905fb260613973b924a678a321a3238 100644 (file)
@@ -495,7 +495,7 @@ static int wimfs_mkdir(const char *path, mode_t mode)
                return -EEXIST;
 
        newdir = new_dentry(basename);
-       newdir->attributes |= WIM_FILE_ATTRIBUTE_DIRECTORY;
+       newdir->attributes |= FILE_ATTRIBUTE_DIRECTORY;
        link_dentry(newdir, parent);
        return 0;
 }
@@ -585,8 +585,6 @@ static int wimfs_mknod(const char *path, mode_t mode, dev_t rdev)
 
        /* Create a lookup table entry having the same hash value */
        lte = new_lookup_table_entry();
-       lte->staging_num_times_opened = 0;
-       lte->resource_entry.original_size = 0;
        memcpy(lte->hash, dentry->hash, WIM_HASH_SIZE);
 
        fd = create_staging_file(&tmpfile_name);
@@ -1105,6 +1103,11 @@ WIMLIBAPI int wimlib_mount(WIMStruct *wim, int image, const char *dir,
        if (flags & WIMLIB_MOUNT_FLAG_READWRITE)
                wim_get_current_image_metadata(wim)->modified = true;
 
+       if (!(flags & (WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_NONE |
+                      WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR |
+                      WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS)))
+               flags |= WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR;
+
        mount_dir = dir;
        working_directory = getcwd(NULL, 0);
        if (!working_directory) {