File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1043,6 +1043,10 @@ namespace RTE {
10431043 FILE *file = fopen (fullPath.c_str (), accessMode.c_str ());
10441044#else
10451045 FILE *file = [&fullPath, &accessMode]() -> FILE * {
1046+ if (std::filesystem::exists (fullPath)) {
1047+ return fopen (fullPath.c_str (), accessMode.c_str ());
1048+ }
1049+
10461050 std::filesystem::path inspectedPath = System::GetWorkingDirectory ();
10471051 const std::filesystem::path relativeFilePath = std::filesystem::path (fullPath).lexically_relative (inspectedPath);
10481052
Original file line number Diff line number Diff line change @@ -222,6 +222,10 @@ namespace RTE {
222222// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
223223
224224 std::string GetCaseInsensitiveFullPath (const std::string &fullPath) {
225+ if (std::filesystem::exists (fullPath)) {
226+ return fullPath;
227+ }
228+
225229 std::filesystem::path inspectedPath = System::GetWorkingDirectory ();
226230 const std::filesystem::path relativeFilePath = std::filesystem::path (fullPath).lexically_relative (inspectedPath);
227231
You can’t perform that action at this time.
0 commit comments