diff options
author | corvid <corvid@lavabit.com> | 2009-01-28 08:51:05 -0300 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-01-28 08:51:05 -0300 |
commit | fa21fc6b615f4b199edae837e8cc2561998f017b (patch) | |
tree | b29cdf4c7895cea5f22b4a2de2f257c9a68b0b4a /src/capi.c | |
parent | e1c1007084bf29111b7fa909ee962ba2f2b56f40 (diff) |
Added a warning message when a file can't be opened for saving
Diffstat (limited to 'src/capi.c')
-rw-r--r-- | src/capi.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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") || |