summary refs log tree commit diff stats
path: root/storage/getdir_unix.go
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-04-08 01:44:15 +0530
committerAndinus <andinus@nand.sh>2020-04-08 01:44:15 +0530
commit34adb3a7e676a43cd692b4da14398a7d1b0be822 (patch)
tree52d071f21eda3fdeb9768ecefb41df1c7ee551e8 /storage/getdir_unix.go
parent47d22337b3a178b14e1cac287799f2c9dfb336e6 (diff)
downloadgrus-34adb3a7e676a43cd692b4da14398a7d1b0be822.tar.gz
Prepare for next rewrite
Diffstat (limited to 'storage/getdir_unix.go')
-rw-r--r--storage/getdir_unix.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/storage/getdir_unix.go b/storage/getdir_unix.go
deleted file mode 100644
index 6f975db..0000000
--- a/storage/getdir_unix.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// +build linux netbsd openbsd freebsd dragonfly
-
-package storage
-
-import (
-	"fmt"
-	"os"
-)
-
-// GetDir returns grus data directory. Check if the user has set
-// XDG_DATA_HOME is set & if that is not set then assume it to be the
-// default value which is $HOME/.local/share according to XDG Base
-// Directory Specification.
-func GetDir() (grusCacheDir string) {
-	cacheDir := SysDir()
-
-	// Grus cache directory is cacheDir/grus.
-	grusCacheDir = fmt.Sprintf("%s/%s", cacheDir,
-		"grus")
-
-	return
-}
-
-// SysDir returns the system data directory, this is useful for unveil in
-// OpenBSD.
-func SysDir() (cacheDir string) {
-	cacheDir = os.Getenv("XDG_DATA_HOME")
-	if len(cacheDir) == 0 {
-		cacheDir = fmt.Sprintf("%s/%s/%s", os.Getenv("HOME"),
-			".local", "share")
-	}
-
-	return
-}