dosfsck corrupts root directory when fs->nfats is 1.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
Hiroaki Ishizawa 2009-02-13 10:00:46 +01:00 committed by Daniel Baumann
parent 043f8a8fb1
commit 95005294d8

View File

@ -174,7 +174,9 @@ void set_fat(DOS_FS *fs,unsigned long cluster,unsigned long new)
}
fs->fat[cluster].value = new;
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);
}
}