mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed a bug when undeleting a sparse file
An old typo leading to a badly recovered file and sometimes to a segfault
This commit is contained in:
parent
08bf2b5bcb
commit
35fbb698ba
@ -1784,7 +1784,7 @@ static int undelete_file(ntfs_volume *vol, long long inode)
|
||||
if (rl[i].lcn == LCN_HOLE) {
|
||||
ntfs_log_verbose("File has a sparse section.\n");
|
||||
memset(buffer, 0, bufsize);
|
||||
for (k = 0; k < rl[k].length * vol->cluster_size; k += bufsize) {
|
||||
for (k = 0; k < rl[i].length * vol->cluster_size; k += bufsize) {
|
||||
if (write_data(fd, buffer, bufsize) < bufsize) {
|
||||
ntfs_log_perror("Write failed");
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user