From f7142be9dd1273c6780f4799d963227d7dca22dd Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 17 Dec 2013 19:46:35 +0000 Subject: [PATCH] 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 --- libretroshare/src/dbase/fimonitor.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 42e5f454d..58c7da42a 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -48,7 +48,7 @@ #include //*********** -//#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 ;