Incorrect file size when listing files
Opened this issue · 0 comments
ArthurDents commented
Hi
uftpd reports incorrect file size when using Winscp and Filezilla. All files are reported with size: 34.359.738.543 KB.
E.g:
19713> Found directory entry .
19713> Found directory entry ..
19713> Found directory entry a.txt
19713> Compose path from cwd: /test2, arg: /a.txt
19713> Final path to file: /test2/a.txt
19713> LIST modify=20240131093819;perm=rw;size=35184372267979;type=file; a.txt
19713> Found directory entry b.txt
19713> Compose path from cwd: /test2, arg: /b.txt
19713> Final path to file: /test2/b.txt
19713> LIST modify=20240131093821;perm=rw;size=35184372268003;type=file; b.txt
This was not an issue on an earlier version of uftpd, so I changed this line in ftpcmd.c back to the earlier version:
//snprintf(size, sizeof(size), "size=%" PRIu64, st->st_size);
snprintf(size, sizeof(size), "size=%" PRIu64, (long long unsigned int)st->st_size);
I am using a 32bit platform: armv71.
BR
AD