dosfsck corrupts root directory when fs->nfats is 1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
parent
043f8a8fb1
commit
95005294d8
@ -174,7 +174,9 @@ void set_fat(DOS_FS *fs,unsigned long cluster,unsigned long new)
|
|||||||
}
|
}
|
||||||
fs->fat[cluster].value = new;
|
fs->fat[cluster].value = new;
|
||||||
fs_write(offs,size,&data);
|
fs_write(offs,size,&data);
|
||||||
fs_write(offs+fs->fat_size,size,&data);
|
if (fs->nfats > 1) {
|
||||||
|
fs_write(offs+fs->fat_size,size,&data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user