Add process to make parent dir if isn't
This commit is contained in:
parent
0377be5f81
commit
f73a4bb453
|
@ -1029,6 +1029,11 @@ static void init()
|
||||||
gchar *path = g_build_filename(
|
gchar *path = g_build_filename(
|
||||||
g_get_user_config_dir(), APPNAME, "easylist.txt", NULL);
|
g_get_user_config_dir(), APPNAME, "easylist.txt", NULL);
|
||||||
|
|
||||||
|
char *dir = g_path_get_dirname(path);
|
||||||
|
if (!g_file_test(dir, G_FILE_TEST_EXISTS))
|
||||||
|
g_mkdir_with_parents(dir, 0700);
|
||||||
|
g_free(dir);
|
||||||
|
|
||||||
GFile *gf = g_file_new_for_path(path);
|
GFile *gf = g_file_new_for_path(path);
|
||||||
GFileMonitor *gm = g_file_monitor_file(gf,
|
GFileMonitor *gm = g_file_monitor_file(gf,
|
||||||
G_FILE_MONITOR_NONE, NULL, NULL);
|
G_FILE_MONITOR_NONE, NULL, NULL);
|
||||||
|
|
6
makefile
6
makefile
|
@ -1,4 +1,4 @@
|
||||||
#CFLAGS += -c -Wall -Wno-deprecated-declarations
|
#CFLAGS += -Wall -Wno-deprecated-declarations
|
||||||
CFLAGS += -Wno-deprecated-declarations
|
CFLAGS += -Wno-deprecated-declarations
|
||||||
#LDFLAGS=
|
#LDFLAGS=
|
||||||
EXTENSION_DIR=$(DESTDIR)/usr/lib/wyebrowser
|
EXTENSION_DIR=$(DESTDIR)/usr/lib/wyebrowser
|
||||||
|
@ -15,13 +15,13 @@ endif
|
||||||
all: adblock.so wyebab librun.o testrun
|
all: adblock.so wyebab librun.o testrun
|
||||||
|
|
||||||
adblock.so: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
|
adblock.so: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o -shared -fPIC \
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o -shared -fPIC \
|
||||||
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0` \
|
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0` \
|
||||||
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
|
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
|
||||||
$(DDEBUG) $(DAPPNAME) -DISEXT
|
$(DDEBUG) $(DAPPNAME) -DISEXT
|
||||||
|
|
||||||
wyebab: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
|
wyebab: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o \
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o \
|
||||||
`pkg-config --cflags --libs glib-2.0 libsoup-2.4` \
|
`pkg-config --cflags --libs glib-2.0 libsoup-2.4` \
|
||||||
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
|
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
|
||||||
$(DDEBUG) $(DAPPNAME)
|
$(DDEBUG) $(DAPPNAME)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user