aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/capi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/capi.c b/src/capi.c
index 41df8de6..c92d16be 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -315,8 +315,12 @@ int a_Capi_open_url(DilloWeb *web, CA_Callback_t Call, void *CbData)
/* download request: if cached save from cache, else
* for http, ftp or https, use the downloads dpi */
if (a_Capi_get_flags(web->url) & CAPI_IsCached) {
- if (web->filename && (web->stream = fopen(web->filename, "w"))) {
- use_cache = 1;
+ if (web->filename) {
+ if ((web->stream = fopen(web->filename, "w"))) {
+ use_cache = 1;
+ } else {
+ MSG_WARN("Cannot open \"%s\" for writing.\n", web->filename);
+ }
}
} else {
if (!dStrcasecmp(scheme, "https") ||