commit: 17ec71535dc9bbb88509f4368f1c7cd26c988fa6
parent 1be56b0a52872b3d23ce23e0672e46ceb794512e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 24 May 2020 18:16:11 +0200
secret edit: put tempfile into basepath
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/secret b/secret
@@ -62,14 +62,14 @@ secret_read_oath() {
}
secret_edit() {
- file=/tmp/secret."$RANDOM".txt
+ file="${basepath}/.secret_$RANDOM.txt"
unset SECRET_FILE
secret_read "$@" > "$file"
- $EDITOR "$file" || rm "$file"
+ $EDITOR "$file" || rm -f "$file"
- secret_write "$@" < "$file" ; rm "$file"
+ secret_write "$@" < "$file" ; rm -f "$file"
}
secret_dmenu() {