Merge pull request #64 from vigo/fix-resolve-db

Add folder check and create before touch db
This commit is contained in:
Lazarus Lazaridis 2020-11-15 10:16:58 +02:00 committed by GitHub
commit d288364550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
}