core: remove .exported db files when database is removed (#7615)

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-09-30 10:09:18 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat
parent 3d3dd421ff
commit 80f8757449
4 changed files with 17 additions and 0 deletions
+2
View File
@@ -124,11 +124,13 @@ deleteStorage = do
fs <- lift storageFiles
liftIO $ closeDBStore `withStores` fs
remove `withDBs` fs
removeExported `withDBs` fs
mapM_ removeDir $ filesPath fs
mapM_ removeDir $ assetsPath fs
mapM_ removeDir =<< chatReadVar tempDirectory
where
remove f = whenM (doesFileExist f) $ removeFile f
removeExported f = remove $ f <> ".exported"
removeDir d = whenM (doesDirectoryExist d) $ removePathForcibly d
data StorageFiles = StorageFiles