diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-03-27 11:38:26 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-03-27 11:38:34 +0100 |
| commit | ebb783a9f2acd0992a5497deb4953271ebfa4726 (patch) | |
| tree | 8b3274cad2a12b92864f35538529c00813cc22b8 /src/net.cpp | |
| parent | Merge pull request #3682 (diff) | |
| parent | replace custom GetFilesize() with boost::filesystem::file_size() (diff) | |
| download | discoin-ebb783a9f2acd0992a5497deb4953271ebfa4726.tar.xz discoin-ebb783a9f2acd0992a5497deb4953271ebfa4726.zip | |
Merge pull request #3603
a486abd replace custom GetFilesize() with boost::filesystem::file_size() (Philip Kaufmann)
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 653f24ec3..657a39bcf 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); |