Commit b4d716e2 authored by Fabian Vogt's avatar Fabian Vogt

Merge branch 'umountfix' into 'master'

Don't delete mountpoint recursively if umount failed

See merge request kde/kio-fuse!7
parents 97459a25 67b30455
......@@ -77,6 +77,10 @@ void FileOpsTest::initTestCase()
QVERIFY( | QIODevice::Unbuffered));
QVERIFY( | QIODevice::Unbuffered | QIODevice::Truncate));
// QTemporaryDir would otherwise rm -rf on destruction,
// which is fatal if umount fails while something is mounted inside
void FileOpsTest::cleanupTestCase()
......@@ -88,8 +92,11 @@ void FileOpsTest::cleanupTestCase()
// umount has to be setuid root (Linux) or vfs.usermount=1 (FreeBSD)
umountProcess.start(QStringLiteral("umount"), {m_mountDir.path()});
// If any of this fails, we can't do anything anyway
QCOMPARE(umountProcess.exitStatus(), QProcess::NormalExit);
QCOMPARE(umountProcess.exitCode(), 0);
// Remove only after umounting suceeded
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