simple-adblock: bugfix: ensure directory for jsonFile is created 20533/head
authorStan Grishin <stangri@melmac.ca>
Sun, 19 Feb 2023 20:22:32 +0000 (20:22 +0000)
committerStan Grishin <stangri@melmac.ca>
Sun, 19 Feb 2023 20:24:21 +0000 (20:24 +0000)
Signed-off-by: Stan Grishin <stangri@melmac.ca>
(cherry picked from commit 2bb10d0c2c9a2517acea9cadeaf2d390066f72f4)

net/simple-adblock/Makefile
net/simple-adblock/files/simple-adblock.init

index abd03099862a70212326ac690fa0ef5e8d98e95e..bb4852502ea97ed8950162c6bb60f14b5112c795 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
 PKG_VERSION:=1.9.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 PKG_LICENSE:=GPL-3.0-or-later
 
index 10fb29532786da785a4cb6ff25b9085a4dee4c87..1522569abbc4f86f2e67502c3356ed32fc12c7a9 100644 (file)
@@ -409,7 +409,7 @@ load_environment() {
                ;;
        esac
 
-       for i in "$outputFile" "$outputCache" "$outputGzip"; do
+       for i in "$jsonFile" "$outputFile" "$outputCache" "$outputGzip"; do
                if ! mkdir -p "$(dirname "$i")"; then
                        if [ "$param" != 'quiet' ]; then
                                json add error "errorOutputDirCreate" "$i"
@@ -668,6 +668,7 @@ json() {
        json_add_string reload "$reload"
        json_add_string restart "$restart"
        json_close_object
+       mkdir -p "$(dirname "$jsonFile")"
        json_dump > "$jsonFile"
        sync
 }