brewbuck: The program that is depositing the files is ftp. If you want to say FTP is broken, be my guest.

Zlatko: Wouldn't it be more efficient to just get the d_ino from the dirent, rather than trying to stat it from the filename? Or is there a reason you chose to do it this way?