If the remove_hiberfile mount option is present, explicitly disallow
the library from switching to a read-only mount. This is only to avoid
confusion, as the remove_hiberfile is processed before taking the
decision to fall back to read-only.
if (ctx->ro)
flags |= NTFS_MNT_RDONLY;
else
- flags |= NTFS_MNT_MAY_RDONLY;
+ if (!ctx->hiberfile)
+ flags |= NTFS_MNT_MAY_RDONLY;
if (ctx->recover)
flags |= NTFS_MNT_RECOVER;
if (ctx->hiberfile)
directory listings.
.TP
.B remove_hiberfile
-Unlike in case of read-only mount, the read-write mount is denied if
-the NTFS volume is hibernated. One needs either to resume Windows and
+When the NTFS volume is hibernated, a read-write mount is denied and
+a read-only mount is forced. One needs either to resume Windows and
shutdown it properly, or use this option which will remove the Windows
hibernation file. Please note, this means that the saved Windows
session will be completely lost. Use this option under your own
if (ctx->ro)
flags |= NTFS_MNT_RDONLY;
else
- flags |= NTFS_MNT_MAY_RDONLY;
+ if (!ctx->hiberfile)
+ flags |= NTFS_MNT_MAY_RDONLY;
if (ctx->recover)
flags |= NTFS_MNT_RECOVER;
if (ctx->hiberfile)