aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2015-03-04 23:36:38 +0000
committercorvid <devnull@localhost>2015-03-04 23:36:38 +0000
commit14cc0a100856253987d2e6859ffe657f75c0cdb1 (patch)
treeba114027033d6fdd1d5a00e9022d260fb46e6f92
parent59775fee0bd17390ced7af4c71e7500b9c9b080a (diff)
better error msg when we can't save a file from cache
-rw-r--r--src/capi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/capi.c b/src/capi.c
index 8013d3c9..c91639bc 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -16,6 +16,7 @@
*/
#include <string.h>
+#include <errno.h>
#include "msg.h"
#include "capi.h"
@@ -401,7 +402,8 @@ int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData)
if ((web->stream = fopen(web->filename, "w"))) {
use_cache = 1;
} else {
- MSG_WARN("Cannot open \"%s\" for writing.\n", web->filename);
+ MSG_WARN("Cannot open \"%s\" for writing: %s.\n",
+ web->filename, dStrerror(errno));
}
}
} else if (a_Cache_download_enabled(web->url)) {