savecache: Make sure cache directory exists before running checkpath
checkpath -W can fail if the specified path doesn't actually exist yet. In this case savecache script should attempt to create the path if it is missing, however it is pre-empted by the checkpath call. This patch adds an explicit existence test before executing checkpath. This fixes #36.
This commit is contained in:
parent
7bbb73574b
commit
ccd83a5e9c
@ -13,7 +13,7 @@ start()
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
if ! checkpath -W "$RC_LIBEXECDIR"/cache; then
|
||||
if [ -e "$RC_LIBEXECDIR"/cache ] && ! checkpath -W "$RC_LIBEXECDIR"/cache; then
|
||||
ewarn "WARNING: ${RC_LIBEXECDIR}/cache is not writable!"
|
||||
if ! yesno "${RC_GOINGDOWN}"; then
|
||||
ewarn "Unable to save deptree cache"
|
||||
|
Loading…
Reference in New Issue
Block a user