From 53ca60596d79b4574b286ebde77fcd1ea33efe06 Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Thu, 29 Jul 2021 11:51:47 +0200
Subject: [PATCH] Fix nuclear order

---
 lib/GHCup.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/GHCup.hs b/lib/GHCup.hs
index 591f3443..5a226e88 100644
--- a/lib/GHCup.hs
+++ b/lib/GHCup.hs
@@ -1542,8 +1542,11 @@ rmGhcupDirs = do
 
   handleRm $ rmEnvFile  envFilePath
   handleRm $ rmConfFile confFilePath
-  handleRm $ rmDir cacheDir
+  
+  -- for xdg dirs, the order matters here
   handleRm $ rmDir logsDir
+  handleRm $ rmDir cacheDir
+
   handleRm $ rmBinDir binDir
   handleRm $ rmDir recycleDir
 #if defined(IS_WINDOWS)
-- 
GitLab