Skip to content

Commit

Permalink
nall: Resolve all file paths passed on command line
Browse files Browse the repository at this point in the history
  • Loading branch information
jcm93 authored and LukeUsher committed Feb 18, 2025
1 parent fb96de3 commit 4197502
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nall/arguments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ inline auto Arguments::construct() -> void {

//normalize path and file arguments
for(auto& argument : arguments) {
if(directory::exists(argument)) argument.transform("\\", "/").trimRight("/").append("/");
else if(file::exists(argument)) argument.transform("\\", "/").trimRight("/");
if(directory::exists(argument)) {
argument.transform("\\", "/").trimRight("/").append("/");
argument = Path::real(argument);
}
else if(file::exists(argument)) {
argument.transform("\\", "/").trimRight("/");
argument = {Path::real(argument), Location::file(argument)};
}
}
}

Expand Down

0 comments on commit 4197502

Please sign in to comment.