Fix random errno returned by ntfs_inode_open() if the MFT record wasn't in use

edge.strict_endians
szaka 2005-07-30 16:36:24 +00:00
parent 7aebba2e12
commit d292ae2d27
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,8 @@ xx/xx/xxxx - 1.12.0-WIP
- Fix unistr.c::ntfs_mbstoucs on systems with utf8 locale. (Yura)
- Change errno and print more verbose message in case if logfile check
failed. (Yura)
- Fix random errno returned by ntfs_inode_open() if the MFT record
wasn't in use. (Szaka)
20/07/2005 - 1.11.1 - Fix several ntfsmount bugs.

View File

@ -123,8 +123,10 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref)
return NULL;
if (ntfs_file_record_read(vol, mref, &ni->mrec, NULL))
goto err_out;
if (!(ni->mrec->flags & MFT_RECORD_IN_USE))
if (!(ni->mrec->flags & MFT_RECORD_IN_USE)) {
err = ENOENT;
goto err_out;
}
ni->mft_no = MREF(mref);
ni->data_size = -1;
ni->allocated_size = -1;