diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-03 13:35:37 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-03 13:35:37 +0000 |
| commit | 823d0f5275afac12cd6ee57c62f392bc08b69e4a (patch) | |
| tree | 0dba4679666a624edb3fe353b5177240da2dd11d | |
| parent | 211986cf675e7bdb8bb51f17416cba040b6f0d80 (diff) | |
Support older boost filesystem library.
| -rw-r--r-- | asdcplib/src/KM_fileio.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/asdcplib/src/KM_fileio.cpp b/asdcplib/src/KM_fileio.cpp index b13d8ba2..2914f982 100644 --- a/asdcplib/src/KM_fileio.cpp +++ b/asdcplib/src/KM_fileio.cpp @@ -1237,8 +1237,13 @@ Kumu::DirScanner::GetNext (char* filename) if (_iterator == boost::filesystem::directory_iterator()) { return RESULT_ENDOFFILE; } - - strncpy (filename, boost::filesystem::path(*_iterator).filename().generic_string().c_str(), MaxFilePath); + +#if BOOST_FILESYSTEM_VERSION == 3 + std::string f = boost::filesystem::path(*_iterator).filename().generic_string(); +#else + std::string f = boost::filesystem::path(*_iterator).filename(); +#endif + strncpy (filename, f.c_str(), MaxFilePath); ++_iterator; return RESULT_OK; } |
