- root->creation_time = le64_to_cpu(ni->creation_time);
- root->last_write_time = le64_to_cpu(ni->last_data_change_time);
- root->last_access_time = le64_to_cpu(ni->last_access_time);
- root->attributes = le32_to_cpu(attributes);
- root->link_group_id = ni->mft_no;
- root->resolved = true;
+
+ if (dir_ni && (name_type == FILE_NAME_WIN32_AND_DOS
+ || name_type == FILE_NAME_WIN32))
+ {
+ ret = ntfs_get_ntfs_dos_name(ni, dir_ni, dos_name_utf8,
+ sizeof(dos_name_utf8));
+ if (ret > 0) {
+ DEBUG("Changing short name of `%s'", path);
+ ret = change_dentry_short_name(root, dos_name_utf8,
+ ret);
+ if (ret != 0)
+ return ret;
+ } else {
+ #ifdef ENODATA
+ if (errno != ENODATA) {
+ ERROR_WITH_ERRNO("Error getting DOS name "
+ "of `%s'", path);
+ return WIMLIB_ERR_NTFS_3G;
+ }
+ #endif
+ }
+ }
+
+ root->d_inode->creation_time = le64_to_cpu(ni->creation_time);
+ root->d_inode->last_write_time = le64_to_cpu(ni->last_data_change_time);
+ root->d_inode->last_access_time = le64_to_cpu(ni->last_access_time);
+ root->d_inode->attributes = le32_to_cpu(attributes);
+ root->d_inode->ino = ni->mft_no;
+ root->d_inode->resolved = true;