summaryrefslogtreecommitdiff
path: root/pkg/backend/cleanup.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/cleanup.go')
-rw-r--r--pkg/backend/cleanup.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/backend/cleanup.go b/pkg/backend/cleanup.go
new file mode 100644
index 0000000..77c55e6
--- /dev/null
+++ b/pkg/backend/cleanup.go
@@ -0,0 +1,16 @@
+package backend
+
+import (
+ "log"
+ "os"
+ "path"
+ "path/filepath"
+)
+
+func cleanupTempDirs() {
+ dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*"))
+ for _, d := range dirs {
+ log.Println("removing temp dir:", d)
+ os.RemoveAll(d)
+ }
+}