diff options
| author | ishaan <contact@ishaan.cc> | 2026-07-15 06:40:02 +0530 |
|---|---|---|
| committer | ishaan <contact@ishaan.cc> | 2026-07-15 06:40:02 +0530 |
| commit | aed1dd45b71d061848e52fbf1b36dd09a52e0021 (patch) | |
| tree | 3a807be47b77bc8331b6754d0cd6659e4474fdfb /internal/utils/utils.go | |
| parent | 2cc09ca2977cafc9da939907b9088dcfba14e685 (diff) | |
use tmpfs instead of tmp dir
Diffstat (limited to 'internal/utils/utils.go')
| -rw-r--r-- | internal/utils/utils.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/utils/utils.go b/internal/utils/utils.go index cea00a3..f620af3 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -66,6 +66,13 @@ func RandomLettersNumbers(n int) []byte { return b } +func SecureTempDir() string { + if _, err := os.Stat("/dev/shm"); err == nil { + return "/dev/shm" + } + return "" +} + func CheckFileAuthMode(notePath string) (crypt.AuthMode, error) { data, err := os.ReadFile(notePath) if err != nil { |