Skip to content

Commit

Permalink
Fix #72: mkdir for datafile if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmc3 committed Dec 28, 2022
1 parent 82f5088 commit 2adfbb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zsh-z.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ zshz() {

# Make sure that the datafile exists before attempting to read it or lock it
# for writing
[[ -f $datafile ]] || touch "$datafile"
[[ -f $datafile ]] || { mkdir -p "${datafile:h}" && touch "$datafile" }

# Bail if we don't own the datafile and $ZSHZ_OWNER is not set
[[ -z ${ZSHZ_OWNER:-${_Z_OWNER}} && -f $datafile && ! -O $datafile ]] &&
Expand Down

0 comments on commit 2adfbb0

Please sign in to comment.