inode->i_nlink = 1;
inode->i_next_stream_id = 1;
inode->i_not_rpfixed = 1;
+ INIT_LIST_HEAD(&inode->i_list);
#ifdef WITH_FUSE
if (pthread_mutex_init(&inode->i_mutex, NULL) != 0) {
ERROR_WITH_ERRNO("Error initializing mutex");
wimlib_assert(inode->i_num_opened_fds == 0);
FREE(inode->i_fds);
pthread_mutex_destroy(&inode->i_mutex);
- if (inode->i_hlist.pprev)
- hlist_del(&inode->i_hlist);
#endif
+ /* HACK: This may instead delete the inode from i_list, but the
+ * hlist_del() behaves the same as list_del(). */
+ hlist_del(&inode->i_hlist);
FREE(inode->i_extracted_file);
FREE(inode);
}
void *buf;
sha1_buffer(data, len, hash);
-
existing_lte = __lookup_resource(lookup_table, hash);
-
if (existing_lte) {
wimlib_assert(wim_resource_size(existing_lte) == len);
lte = existing_lte;
lte->refcnt++;
} else {
- void *buf;
-
lte = new_lookup_table_entry();
if (!lte)
return WIMLIB_ERR_NOMEM;
if (size != sizeof(struct wimlib_unix_data))
return BAD_UNIX_DATA;
- ret = read_full_resource_into_buf(lte, unix_data, true);
+ ret = read_full_resource_into_buf(lte, unix_data);
if (ret)
return ret;
#ifdef __WIN32__
if (wcschr(L"<>:\"/\\|?*", (wchar_t)*p))
#else
- if (*p == '/')
+ if (*p == cpu_to_le16('/'))
#endif
{
+ #ifdef __WIN32__
+ *p = cpu_to_le16(0xfffd);
+ #else
+ *p = cpu_to_le16('?');
+ #endif
if (name) {
WARNING("File, directory, or stream name \"%"WS"\"\n"
" contains forbidden characters; "
- "replacing them with Unicode codepoint U+001A",
+ "substituting replacement characters.",
name);
name = NULL;
}
- *p = 0x1a;
}
}
}