diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfetch/ftp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c index 8e38beb..031a243 100644 --- a/lib/libfetch/ftp.c +++ b/lib/libfetch/ftp.c @@ -259,6 +259,8 @@ _ftp_stat(int cd, char *file, struct url_stat *us) _ftp_seterr(FTP_PROTOCOL_ERROR); return -1; } + if (us->size == 0) + us->size = -1; DEBUG(fprintf(stderr, "size: [\033[1m%lld\033[m]\n", us->size)); if ((e = _ftp_cmd(cd, "MDTM %s", s)) != FTP_FILE_STATUS) { @@ -845,9 +847,6 @@ fetchStatFTP(struct url *url, struct url_stat *us, char *flags) if (_ftp_use_http_proxy()) return fetchStatHTTP(url, us, flags); - us->size = -1; - us->atime = us->mtime = 0; - /* connect to server */ if ((cd = _ftp_cached_connect(url, flags)) == NULL) return -1; |