Fixed checking for already mounted device on non-Linux platforms

PERMISSION_HANDLING_BRANCH
Jean-Pierre André 2010-08-28 14:02:08 +02:00
parent 008d8c5df9
commit 66b6a9c219
2 changed files with 4 additions and 4 deletions

View File

@ -4379,8 +4379,8 @@ int main(int argc, char *argv[])
err = NTFS_VOLUME_SYNTAX_ERROR;
goto err_out;
}
if (ntfs_check_if_mounted(opts.device,&existing_mount)
|| (existing_mount & NTFS_MF_MOUNTED)) {
if (!ntfs_check_if_mounted(opts.device,&existing_mount)
&& (existing_mount & NTFS_MF_MOUNTED)) {
err = NTFS_VOLUME_LOCKED;
goto err_out;
}

View File

@ -4332,8 +4332,8 @@ int main(int argc, char *argv[])
err = NTFS_VOLUME_SYNTAX_ERROR;
goto err_out;
}
if (ntfs_check_if_mounted(opts.device,&existing_mount)
|| (existing_mount & NTFS_MF_MOUNTED)) {
if (!ntfs_check_if_mounted(opts.device,&existing_mount)
&& (existing_mount & NTFS_MF_MOUNTED)) {
err = NTFS_VOLUME_LOCKED;
goto err_out;
}