Merge pull request #9396
Some checks failed
ci/gh-actions/cli / build-macos (push) Has been cancelled
ci/gh-actions/cli / build-windows (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-20.04) (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-22.04) (push) Has been cancelled
ci/gh-actions/cli / libwallet-ubuntu (push) Has been cancelled
ci/gh-actions/cli / source-archive (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:aarch64-apple-darwin11 name:Cross-Mac aarch64 packages:cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:aarch64-linux-gnu name:ARM v8 packages:python3 gperf g++-aarch64-linux-gnu]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:arm-linux-gnueabihf name:ARM v7 packages:python3 gperf g++-arm-linux-gnueabihf]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:i686-pc-linux-gnu name:i686 Linux packages:gperf cmake g++-multilib python3-zmq]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:i686-w64-mingw32 name:i686 Win packages:python3 g++-mingw-w64-i686]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:riscv64-linux-gnu name:RISCV 64bit packages:python3 gperf g++-riscv64-linux-gnu]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:x86_64-apple-darwin11 name:Cross-Mac x86_64 packages:cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:x86_64-unknown-freebsd name:x86_64 Freebsd packages:clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:x86_64-unknown-linux-gnu name:x86_64 Linux packages:gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev]) (push) Has been cancelled
ci/gh-actions/depends / ${{ matrix.toolchain.name }} (map[host:x86_64-w64-mingw32 name:Win64 packages:cmake python3 g++-mingw-w64-x86-64]) (push) Has been cancelled
ci/gh-actions/cli / test-ubuntu (push) Has been cancelled

b9fddc0 epee: fix mlog filename compare bug. (0xFFFC0000)
This commit is contained in:
luigi1111 2024-07-16 19:03:10 -04:00
commit 76feeb64b7
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -176,11 +176,12 @@ void mlog_configure(const std::string &filename_base, bool console, const std::s
std::vector<boost::filesystem::path> found_files;
const boost::filesystem::directory_iterator end_itr;
const boost::filesystem::path filename_base_path(filename_base);
const std::string filename_base_name = filename_base_path.filename().string();
const boost::filesystem::path parent_path = filename_base_path.has_parent_path() ? filename_base_path.parent_path() : ".";
for (boost::filesystem::directory_iterator iter(parent_path); iter != end_itr; ++iter)
{
const std::string filename = iter->path().string();
if (filename.size() >= filename_base.size() && std::memcmp(filename.data(), filename_base.data(), filename_base.size()) == 0)
const std::string filename = iter->path().filename().string();
if (filename.size() >= filename_base_name.size() && std::memcmp(filename.data(), filename_base_name.data(), filename_base_name.size()) == 0)
{
found_files.push_back(iter->path());
}