Opened 7 years ago
Closed 7 years ago
Last modified 7 years ago
#10867 closed Bug report (fixed)
libfilezilla fails to lstat some files on 32 bit systems
|Reported by:||Pulfer||Owned by:||Tim Kosse|
|Component version:||Operating system type:||Linux|
|Operating system version:||ROSA Desktop Fresh 2014.1|
Sometimes lslat() from local_filesys.cpp
int result = lstat(path.c_str(), &buf);
fails with "Value too large for defined data type" on 32 bit Linux systems. So FileZilla doesn't show filesize and modification date for such files and cannot upload them.
It can be fixed by forcing
#define _FILE_OFFSET_BITS 64
But perhaps it's better to use stat64/lstat64 instead of stat/lstat?
Change History (3)
comment:1 by , 7 years ago
|Status:||new → accepted|
comment:2 by , 7 years ago
|Status:||accepted → closed|
A fix for this has been committed to the repository. The configure script now calls AC_SYS_LARGEFILE and a static_assert has been added local_filesys.cpp
comment:3 by , 7 years ago
Thank you for the report and the analysis.
Frankly, this is a good example of what is wrong in the computing world. Instead of adding this kludge define, they should have simply made off_t a 64bit value and in the process should have required all programs to be recompiled.
All this backwards compatibility cruft should go the way of the dodo. The one and only reason backwards compatibility exists is to appease bean-counting managers, as there's no technical reason.