[partition] Complain if unmount fails

- If unmount fails, then warn and don't autoremove
This commit is contained in:
Adriaan de Groot 2018-11-02 12:04:09 -04:00
parent bd1b482242
commit 516ae494bf

View File

@ -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;