mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
d839301b7c
commit
f7142be9dd
@ -48,7 +48,7 @@
|
|||||||
#include <time.h>
|
#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)
|
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 ;
|
f.getline(buff,max_line_size,'\n') ; //if(sscanf(buff,"%llu",&info.size) != 1) break ;
|
||||||
|
|
||||||
info.size = 0 ;
|
info.size = 0 ;
|
||||||
|
#ifdef WINDOWS_SYS
|
||||||
sscanf(buff, UINT64FMT, &info.size);
|
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.time_stamp) != 1) break ;
|
||||||
f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%ld",&info.modf_stamp) != 1) break ;
|
f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%ld",&info.modf_stamp) != 1) break ;
|
||||||
|
Loading…
Reference in New Issue
Block a user