Merge pull request #20532 from stangri/master-simple-adblock
simple-adblock: bugfix: ensure directory for jsonFile is created
This commit is contained in:
commit
dc77446ae0
2 changed files with 3 additions and 2 deletions
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=simple-adblock
|
PKG_NAME:=simple-adblock
|
||||||
PKG_VERSION:=1.9.4
|
PKG_VERSION:=1.9.4
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
|
@ -409,7 +409,7 @@ load_environment() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for i in "$outputFile" "$outputCache" "$outputGzip"; do
|
for i in "$jsonFile" "$outputFile" "$outputCache" "$outputGzip"; do
|
||||||
if ! mkdir -p "$(dirname "$i")"; then
|
if ! mkdir -p "$(dirname "$i")"; then
|
||||||
if [ "$param" != 'quiet' ]; then
|
if [ "$param" != 'quiet' ]; then
|
||||||
json add error "errorOutputDirCreate" "$i"
|
json add error "errorOutputDirCreate" "$i"
|
||||||
|
@ -668,6 +668,7 @@ json() {
|
||||||
json_add_string reload "$reload"
|
json_add_string reload "$reload"
|
||||||
json_add_string restart "$restart"
|
json_add_string restart "$restart"
|
||||||
json_close_object
|
json_close_object
|
||||||
|
mkdir -p "$(dirname "$jsonFile")"
|
||||||
json_dump > "$jsonFile"
|
json_dump > "$jsonFile"
|
||||||
sync
|
sync
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue