diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-01-30 10:55:55 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-03-03 22:33:09 +0100 |
commit | a486abd419d76ec3aec4adb90216eccb7b4be0c4 (patch) | |
tree | 371c743e3a4fea997da977c05275e728c66f1900 /src/net.cpp | |
parent | aefbf6e30cadaf77ebee44284c74cc5449dc173f (diff) |
replace custom GetFilesize() with boost::filesystem::file_size()
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index bb1d1bac45..d3d276eb59 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -27,6 +27,8 @@ #include <miniupnpc/upnperrors.h> #endif +#include <boost/filesystem.hpp> + // Dump addresses to peers.dat every 15 minutes (900s) #define DUMP_ADDRESSES_INTERVAL 900 @@ -1986,9 +1988,9 @@ bool CAddrDB::Read(CAddrMan& addr) return error("CAddrman::Read() : open failed"); // use file size to size memory buffer - int fileSize = GetFilesize(filein); + int fileSize = boost::filesystem::file_size(pathAddr); int dataSize = fileSize - sizeof(uint256); - //Don't try to resize to a negative number if file is small + // Don't try to resize to a negative number if file is small if ( dataSize < 0 ) dataSize = 0; vector<unsigned char> vchData; vchData.resize(dataSize); |