From 6ea2fe5e930ef0cf1d78f3a895966c8bbe1d9acb Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 8 Oct 2018 13:08:08 +0200 Subject: Fix wiping current directory when deleting off-the-record profiles --- lib/web/profilemanager.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/web') diff --git a/lib/web/profilemanager.h b/lib/web/profilemanager.h index 5d751d2..ad6fa1f 100644 --- a/lib/web/profilemanager.h +++ b/lib/web/profilemanager.h @@ -49,9 +49,15 @@ private: if(!deleteSelf) this->settings.sync(); else { - QFile(path).remove(); - QDir(profile->persistentStoragePath()).removeRecursively(); - QDir(profile->cachePath()).removeRecursively(); + QFile::remove(path); + + if(!profile->isOffTheRecord()) { + if(!profile->persistentStoragePath().isEmpty()) + QDir(profile->persistentStoragePath()).removeRecursively(); + + if(!profile->cachePath().isEmpty()) + QDir(profile->cachePath()).removeRecursively(); + } } } -- cgit v1.2.1