Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions StaticResourceAssert/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

////////////////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -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) {
Expand Down
14 changes: 7 additions & 7 deletions StaticResourceAssert/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <fstream>
#include <algorithm>

namespace fs = std::filesystem;

////////////////////////

Expand Down Expand Up @@ -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<std::string> 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, "\\", "/" );

Expand Down