fixed du file size
This commit is contained in:
parent
1816b7913d
commit
d979112b4e
2
main.c
2
main.c
|
@ -92,6 +92,8 @@ static int fs_getattr(const char *path, struct stat *stbuf)
|
|||
stbuf->st_mode = S_IFREG | 0444;
|
||||
stbuf->st_nlink = 1;
|
||||
stbuf->st_size = link->content_length;
|
||||
stbuf->st_blksize = 128*1024;
|
||||
stbuf->st_blocks = (link->content_length)/512;
|
||||
break;
|
||||
default:
|
||||
return -ENOENT;
|
||||
|
|
|
@ -574,6 +574,8 @@ void LinkTable_fill(LinkTable *linktbl)
|
|||
|
||||
if (this_link->type == LINK_FILE && !(this_link->content_length)) {
|
||||
Link_get_stat(this_link);
|
||||
} else if (this_link->type == LINK_DIR) {
|
||||
this_link->time = head_link->time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -617,6 +619,7 @@ URL: %s, HTTP %ld\n", url, http_resp);
|
|||
linktbl = NULL;
|
||||
return linktbl;
|
||||
};
|
||||
curl_easy_getinfo(curl, CURLINFO_FILETIME, &(head_link->time));
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
/* Otherwise parsed the received data */
|
||||
|
|
Loading…
Reference in New Issue