Commit 5e77368d authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak

Fix reading NTFS usage after resize (#57)

After an NTFS file system has been resized the command GParted currently
uses to read the file system usage fails like this:

    # ntfsinfo --mft /dev/sdb1
    Volume is scheduled for check.
    Please boot into Windows TWICE, or use the 'force' option.
    NOTE: If you had not scheduled check and last time accessed this volume
    using ntfsmount and shutdown system properly, then init scripts in your
    distribution are broken. Please report to your distribution developers
    (NOT to us!) that init scripts kill ntfsmount or mount.ntfs-fuse during
    shutdown instead of proper umount.
    Failed to open '/dev/sdb1'.

Fix by added the '--force' flag as described in the error message.

Closes #57 - NTFS Resize results in Partition Information Warning on
             Refresh
parent fbcf4b56
Pipeline #84667 passed with stages
in 17 minutes and 41 seconds
...@@ -105,7 +105,7 @@ FS ntfs::get_filesystem_support() ...@@ -105,7 +105,7 @@ FS ntfs::get_filesystem_support()
void ntfs::set_used_sectors( Partition & partition ) void ntfs::set_used_sectors( Partition & partition )
{ {
exit_status = Utils::execute_command("ntfsinfo --mft " + Glib::shell_quote(partition.get_path()), exit_status = Utils::execute_command("ntfsinfo --mft --force " + Glib::shell_quote(partition.get_path()),
output, error, true); output, error, true);
if (exit_status != 0) if (exit_status != 0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment