From 516ae494bf07dc8ebcecaab008f1120813869273 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Nov 2018 12:04:09 -0400 Subject: [PATCH] [partition] Complain if unmount fails - If unmount fails, then warn and don't autoremove --- src/modules/partition/core/PartUtils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 0423e1dde..e9d15ebb6 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -196,7 +196,12 @@ lookForFstabEntries( const QString& partitionPath ) fstabFile.close(); } - QProcess::execute( "umount", { "-R", mountsDir.path() } ); + if ( QProcess::execute( "umount", { "-R", mountsDir.path() } ) ) + { + cWarning() << "Could not unmount" << mountsDir.path(); + // There is stuff left in there, really don't remove + mountsDir.setAutoRemove( false ); + } } return fstabEntries;