From e94a3165bd2e90f530a082ec73838b4feebbe709 Mon Sep 17 00:00:00 2001 From: Nikita Zimin Date: Sat, 11 May 2024 00:10:58 +0300 Subject: [PATCH] WIP on macOS --- BKImage.cpp | 5 +++-- bkdecmd.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BKImage.cpp b/BKImage.cpp index 013e5ca..93c209d 100644 --- a/BKImage.cpp +++ b/BKImage.cpp @@ -424,10 +424,11 @@ void CBKImage::PrintItem(BKDirDataItem& fr, const int level, std::wstring dirpat std::wcout << std::setw(strSpecific.length()) << std::left << strSpec; } - if (m_bCalcSHA1) + std::wcout << L" | "; + if (m_bCalcSHA1 && (fr.nAttr & FR_ATTR::DELETED) == 0) { std::wstring strHash = m_pFloppyImage->CalcFileSHA1(&fr); - std::wcout << L" | " << strHash; + std::wcout << strHash; } } else if (m_nListingFormat == LISTING_FORMAT::RAR_LIKE) diff --git a/bkdecmd.cpp b/bkdecmd.cpp index 2ec996d..db32974 100644 --- a/bkdecmd.cpp +++ b/bkdecmd.cpp @@ -2,6 +2,7 @@ // #include "pch.h" +#include #include "BKParseImage.h" #include "BKImage.h" @@ -209,6 +210,7 @@ int main(int argc, char* argv[]) { // Console output mode std::setlocale(LC_ALL, ""); + std::wcout.imbue(std::locale("")); std::vector wargs; std::wstring_convert> converter;