Skip to content

Commit

Permalink
add_inode: don't truncate value of symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
maharmstone committed Sep 27, 2021
1 parent d30191a commit 7664363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ntfs2btrfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2503,12 +2503,15 @@ static void add_inode(root& r, uint64_t inode, uint64_t ntfs_inode, bool& is_dir
if (!is_dir && !reparse_point.empty()) {
inline_data = reparse_point;
file_size = reparse_point.size();
vdl = inline_data.size();
} else if (!symlink.empty()) {
mappings.clear();
file_size = symlink.size();

inline_data.resize(symlink.size());
memcpy(inline_data.data(), symlink.data(), symlink.size());

vdl = inline_data.size();
}

if (!is_dir)
Expand Down

0 comments on commit 7664363

Please sign in to comment.