[gparted/57-ntfs-resize-results-in-partition-information-warning-on-refresh] Fix reading NTFS usage after resize (#57)



commit 2d20dea803a0ba09e8f70ac5bdc62c597e944633
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Fri May 24 12:38:51 2019 +0100

    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

 src/ntfs.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/ntfs.cc b/src/ntfs.cc
index e8dc4bc5..53a8d6b9 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -105,7 +105,7 @@ FS ntfs::get_filesystem_support()
 
 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);
        if (exit_status != 0)
        {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]