diff --git a/ntfsprogs/ntfsfix.c b/ntfsprogs/ntfsfix.c index 3d977e24..828ee05b 100644 --- a/ntfsprogs/ntfsfix.c +++ b/ntfsprogs/ntfsfix.c @@ -291,7 +291,7 @@ static int set_dirty_flag(ntfs_volume *vol) /* Porting note: We test for the current state of VOLUME_IS_DIRTY. This * should actually be more appropriate than testing for NVolWasDirty. */ - if (vol->flags | VOLUME_IS_DIRTY) + if (vol->flags & VOLUME_IS_DIRTY) return 0; ntfs_log_info("Setting required flags on partition... "); /* @@ -299,7 +299,7 @@ static int set_dirty_flag(ntfs_volume *vol) * and fix it for us. */ flags = vol->flags | VOLUME_IS_DIRTY; - if (OLD_ntfs_volume_set_flags(vol, flags)) { + if (!opt.no_action && OLD_ntfs_volume_set_flags(vol, flags)) { ntfs_log_info(FAILED); ntfs_log_error("Error setting volume flags.\n"); return -1;