X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fiterate_dir.c;h=9fed454ab6b45d63477e8ee1897820088b031eea;hb=1c142989478a3e670fbb6953d98adfa988441e5b;hp=7dc63486618d4f93065c251ca7387829abdb8084;hpb=3de1ec66f778edda19865482d685bc6f4e17faf7;p=wimlib diff --git a/src/iterate_dir.c b/src/iterate_dir.c index 7dc63486..9fed454a 100644 --- a/src/iterate_dir.c +++ b/src/iterate_dir.c @@ -91,12 +91,12 @@ init_wimlib_dentry(struct wimlib_dir_entry *wdentry, struct wim_dentry *dentry, const struct wim_inode_stream *strm; struct wimlib_unix_data unix_data; - ret = utf16le_get_tstr(dentry->file_name, dentry->file_name_nbytes, + ret = utf16le_get_tstr(dentry->d_name, dentry->d_name_nbytes, &wdentry->filename, &dummy); if (ret) return ret; - ret = utf16le_get_tstr(dentry->short_name, dentry->short_name_nbytes, + ret = utf16le_get_tstr(dentry->d_short_name, dentry->d_short_name_nbytes, &wdentry->dos_name, &dummy); if (ret) return ret; @@ -104,12 +104,12 @@ init_wimlib_dentry(struct wimlib_dir_entry *wdentry, struct wim_dentry *dentry, ret = calculate_dentry_full_path(dentry); if (ret) return ret; - wdentry->full_path = dentry->_full_path; + wdentry->full_path = dentry->d_full_path; for (struct wim_dentry *d = dentry; !dentry_is_root(d); d = d->d_parent) wdentry->depth++; - if (inode->i_security_id >= 0) { + if (inode_has_security_descriptor(inode)) { struct wim_security_data *sd; sd = wim_get_current_security_data(wim); @@ -219,6 +219,8 @@ do_iterate_dir_tree(WIMStruct *wim, } } out_free_wimlib_dentry: + FREE(dentry->d_full_path); + dentry->d_full_path = NULL; free_wimlib_dentry(wdentry); out: return ret; @@ -261,6 +263,11 @@ wimlib_iterate_dir_tree(WIMStruct *wim, int image, const tchar *_path, path = canonicalize_wim_path(_path); if (path == NULL) return WIMLIB_ERR_NOMEM; + + ret = wim_checksum_unhashed_blobs(wim); + if (ret) + return ret; + struct image_iterate_dir_tree_ctx ctx = { .path = path, .flags = flags,