fixed parsing of size on non windows systems. unsigned long int requires %lu. Needs to be tested on MacOS

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6948 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-12-17 19:46:35 +00:00
parent d839301b7c
commit f7142be9dd

View File

@ -48,7 +48,7 @@
#include <time.h>
//***********
//#define FIM_DEBUG 1
#define FIM_DEBUG 1
// ***********/
FileIndexMonitor::FileIndexMonitor(CacheStrapper *cs, NotifyBase *cb_in,std::string cachedir, std::string pid,const std::string& config_dir)
@ -135,7 +135,11 @@ HashCache::HashCache(const std::string& path)
f.getline(buff,max_line_size,'\n') ; //if(sscanf(buff,"%llu",&info.size) != 1) break ;
info.size = 0 ;
#ifdef WINDOWS_SYS
sscanf(buff, UINT64FMT, &info.size);
#else
sscanf(buff, "%lu", &info.size);
#endif
f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%ld",&info.time_stamp) != 1) break ;
f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%ld",&info.modf_stamp) != 1) break ;