improve error message for fopen - surf-adblock - Surf adblock web extension
HTML git clone git://git.codemadness.org/surf-adblock
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 4372e931d7e1131c49406bb5d30917be4b37db89
DIR parent 0cd2ac315bf63d72bb5e7241b08588c92627efc7
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 14 Jul 2016 22:52:32 +0200
improve error message for fopen
Diffstat:
M surf-adblock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/surf-adblock.c b/surf-adblock.c
@@ -748,7 +748,8 @@ webkit_web_extension_initialize(WebKitWebExtension *e)
const char *filename = "/home/hiltjo/adblock_rules";
if (!(fp = fopen(filename, "r"))) {
- fprintf(stderr, "cannot read rules from file: %s\n", filename);
+ fprintf(stderr, "fatal: cannot read rules file: %s: %s\n",
+ filename, strerror(errno));
return;
}
if (!(rules = loadrules(fp))) {