diff --git a/StaticResourceAssert/Common.cpp b/StaticResourceAssert/Common.cpp index bc772bf..4f2bd7b 100644 --- a/StaticResourceAssert/Common.cpp +++ b/StaticResourceAssert/Common.cpp @@ -22,7 +22,7 @@ NOTE: 0.0.YYYYMMDD should only be in the main branch. Its a non-release version number */ -const char* SRA_PROGRAM_VERSION = "0.0.20250216"; +const char* SRA_PROGRAM_VERSION = "0.0.20250219"; //////////////////////////////////////////////////////////////////////////////////////////// @@ -68,7 +68,7 @@ void TrimStartWhitespace(std::string& inout) { auto beginIter = inout.begin(); while(inout.end() != beginIter && std::isspace(*beginIter)) { beginIter = inout.erase(beginIter); - } + } } void TrimEndWhitespace(std::string& inout) { diff --git a/StaticResourceAssert/Main.cpp b/StaticResourceAssert/Main.cpp index ab9f471..76bb893 100644 --- a/StaticResourceAssert/Main.cpp +++ b/StaticResourceAssert/Main.cpp @@ -4,6 +4,7 @@ #include #include +namespace fs = std::filesystem; //////////////////////// @@ -57,22 +58,21 @@ int main( int argc, char** argv ) outputHeaderStr = GetArgData( "-o", argc, argv ); } - const std::filesystem::path dirPath { directoryStr }; - if( !std::filesystem::exists(dirPath) ) { + const fs::path dirPath { directoryStr }; + if( !fs::exists(dirPath) ) { PSTREAM_NL( "Directory: " << directoryStr << " doesn't exist" ); return -2; } PSTREAM_NL( "Indexing directory: " << directoryStr << " ..." ); - std::filesystem::directory_entry resourceDir(dirPath); + fs::directory_entry resourceDir(dirPath); + std::error_code ec; std::vector arrayItems; - for( const std::filesystem::directory_entry& dirEntry : std::filesystem::recursive_directory_iterator{resourceDir, std::filesystem::directory_options::skip_permission_denied} ) + for( const fs::directory_entry& dirEntry : fs::recursive_directory_iterator{resourceDir, fs::directory_options::skip_permission_denied, ec} ) { - std::filesystem::path dirPath = dirEntry.path(); - - std::string pathPathStr = dirPath.u8string(); + std::string pathPathStr = dirEntry.path().u8string(); replace_all( pathPathStr, "\\", "/" );