simplify rules file path construction - surf-adblock - Surf adblock web extensi… | |
git clone git://git.codemadness.org/surf-adblock | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 82cd3bf28176da0e23599f586ef6f18f06a059ba | |
parent 94705d18c8191bd931b284dfc50c4c6f100ea65a | |
Author: Quentin Rameau <[email protected]> | |
Date: Sat, 16 Jul 2016 19:14:00 +0200 | |
simplify rules file path construction | |
Diffstat: | |
M surf-adblock.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/surf-adblock.c b/surf-adblock.c | |
@@ -804,7 +804,7 @@ webkit_web_extension_initialize(WebKitWebExtension *ext) | |
if (!(e = getenv("HOME"))) | |
e = ""; | |
n = snprintf(filepath, sizeof(filepath), "%s%s.surf/adblockrul… | |
- e, e[0] && e[strlen(e) - 1] != '/' ? "/" : ""); | |
+ e, e[0] ? "/" : ""); | |
} | |
if (n < 0 || (size_t)n >= sizeof(filepath)) | |
eprintf("fatal: rules file path too long"); |