aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-08 13:08:08 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-08 13:08:08 +0200
commit6ea2fe5e930ef0cf1d78f3a895966c8bbe1d9acb (patch)
tree96e9c014c92fe96de8098a4b3145caa128b2c136
parentExpand HTTP header settings #4 (diff)
downloadsmolbote-6ea2fe5e930ef0cf1d78f3a895966c8bbe1d9acb.tar.xz
Fix wiping current directory when deleting off-the-record profiles
-rw-r--r--lib/web/profilemanager.h12
1 files changed, 9 insertions, 3 deletions
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();
+ }
}
}