mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
file.exists, ... completely nothrow
This commit is contained in:
parent
5f00cf0d5b
commit
57fd91b417
3 changed files with 7 additions and 4 deletions
|
|
@ -139,7 +139,7 @@ static fs::path toCanonic(fs::path path) {
|
|||
return path;
|
||||
}
|
||||
|
||||
fs::path EnginePaths::resolve(std::string path) {
|
||||
fs::path EnginePaths::resolve(std::string path, bool throwErr) {
|
||||
size_t separator = path.find(':');
|
||||
if (separator == std::string::npos) {
|
||||
throw files_access_error("no entry point specified");
|
||||
|
|
@ -165,7 +165,10 @@ fs::path EnginePaths::resolve(std::string path) {
|
|||
}
|
||||
}
|
||||
}
|
||||
throw files_access_error("unknown entry point '"+prefix+"'");
|
||||
if (throwErr) {
|
||||
throw files_access_error("unknown entry point '"+prefix+"'");
|
||||
}
|
||||
return fs::path(filename);
|
||||
}
|
||||
|
||||
ResPaths::ResPaths(fs::path mainRoot, std::vector<PathsRoot> roots)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue