}
DEBUG("Calculating SHA1 checksums for all new staging files.");
- list_for_each_entry(lte, &ctx->staging_list, staging_list) {
+ list_for_each_entry_safe(lte, tmp, &ctx->staging_list, staging_list) {
ret = update_lte_of_staging_file(lte, w->lookup_table);
if (ret != 0)
return ret;
if (!inode)
return -errno;
- if (inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT)
- return -EEXIST;
-
- if (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY)
+ if (inode->i_attributes & (FILE_ATTRIBUTE_DIRECTORY |
+ FILE_ATTRIBUTE_REPARSE_POINT))
return -EPERM;
from_dentry_parent = get_parent_dentry(w, from);
if (!from_dentry_parent)
- return -ENOENT;
+ return -errno;
if (!dentry_is_directory(from_dentry_parent))
return -ENOTDIR;
}
ret = alloc_wimfs_fd(inode, stream_id, lte, &fd,
- wimfs_ctx_readonly(ctx));
+ wimfs_ctx_readonly(ctx));
if (ret != 0)
return ret;