diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-06-22 22:00:23 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2020-06-26 12:13:44 +0200 |
commit | 06a7453984adca0b34e62421a1baa8fe54b0d7bb (patch) | |
tree | 4eb7d0f31d540c33d2d6f53ed44257c06a4d8220 /pkg/backend/cleanup.go | |
parent | 20266b063c1be8818d4582bff7b59486551ee447 (diff) |
[refactor] several simplifications after review
- simplify notification routine (we dont need no rejected action). we
just check every hour, as in the original code.
- open links directly from Qt
- rename some global variables to make them less cryptic
- move cleanup function to the same module that created them
Diffstat (limited to 'pkg/backend/cleanup.go')
-rw-r--r-- | pkg/backend/cleanup.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/pkg/backend/cleanup.go b/pkg/backend/cleanup.go index 77c55e6..16f36e4 100644 --- a/pkg/backend/cleanup.go +++ b/pkg/backend/cleanup.go @@ -1,16 +1,9 @@ package backend import ( - "log" - "os" - "path" - "path/filepath" + "0xacab.org/leap/bitmask-vpn/pkg/vpn" ) -func cleanupTempDirs() { - dirs, _ := filepath.Glob(path.Join(os.TempDir(), "leap-*")) - for _, d := range dirs { - log.Println("removing temp dir:", d) - os.RemoveAll(d) - } +func cleanup() { + vpn.Cleanup() } |