From 22f41b8e163a2bf857bf0d83d7756963d6c622d9 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 22 Dec 2013 19:50:46 +0000 Subject: [PATCH] fixed parsong of file_cache. %ld was used in place of %lu git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6957 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fimonitor.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 58c7da42a..e1a805ca1 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) @@ -141,8 +141,13 @@ HashCache::HashCache(const std::string& path) 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 ; +#ifdef WINDOWS_SYS + f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,UINT64FMT,&info.time_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; } + f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,UINT64FMT,&info.modf_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; } +#else + f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%lu",&info.time_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; } + f.getline(buff,max_line_size,'\n') ; if(sscanf(buff,"%lu",&info.modf_stamp) != 1) { std::cerr << "Could not read one entry! Giving up." << std::endl; break ; } +#endif f.getline(buff,max_line_size,'\n') ; info.hash = std::string(buff) ; if(info.hash.length() != 40)