mirror of
https://github.com/iridakos/goto.git
synced 2025-05-15 23:10:35 -07:00
Add folder check before touch db
This commit is contained in:
parent
e5baca394f
commit
ba1b0a9452
4
goto.sh
4
goto.sh
@ -77,6 +77,10 @@ _goto_resolve_db()
|
||||
{
|
||||
local CONFIG_DEFAULT="${XDG_CONFIG_HOME:-$HOME/.config}/goto"
|
||||
GOTO_DB="${GOTO_DB:-$CONFIG_DEFAULT}"
|
||||
GOTO_DB_CONFIG_DIRNAME=$(dirname "$GOTO_DB")
|
||||
if [[ ! -d "$GOTO_DB_CONFIG_DIRNAME" ]]; then
|
||||
mkdir "$GOTO_DB_CONFIG_DIRNAME"
|
||||
fi
|
||||
touch -a "$GOTO_DB"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user