File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1043,6 +1043,10 @@ namespace RTE {
1043
1043
FILE *file = fopen (fullPath.c_str (), accessMode.c_str ());
1044
1044
#else
1045
1045
FILE *file = [&fullPath, &accessMode]() -> FILE* {
1046
+ if (std::filesystem::exists (fullPath)) {
1047
+ return fopen (fullPath.c_str (), accessMode.c_str ());
1048
+ }
1049
+
1046
1050
std::filesystem::path inspectedPath = System::GetWorkingDirectory ();
1047
1051
const std::filesystem::path relativeFilePath = std::filesystem::path (fullPath).lexically_relative (inspectedPath);
1048
1052
Original file line number Diff line number Diff line change @@ -222,6 +222,10 @@ namespace RTE {
222
222
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
223
223
224
224
std::string GetCaseInsensitiveFullPath (const std::string &fullPath) {
225
+ if (std::filesystem::exists (fullPath)) {
226
+ return fullPath;
227
+ }
228
+
225
229
std::filesystem::path inspectedPath = System::GetWorkingDirectory ();
226
230
const std::filesystem::path relativeFilePath = std::filesystem::path (fullPath).lexically_relative (inspectedPath);
227
231
You can’t perform that action at this time.
0 commit comments