From a486abd419d76ec3aec4adb90216eccb7b4be0c4 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 30 Jan 2014 10:55:55 +0100 Subject: replace custom GetFilesize() with boost::filesystem::file_size() --- src/net.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/net.cpp') 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 #endif +#include + // 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 vchData; vchData.resize(dataSize); -- cgit v1.2.3