Skip to content

Commit 50fd85b

Browse files
authored
Merge pull request #154 from conhlee/master
Fix: prevent possible relative path on non-UNIX systems (Windows)
2 parents c770650 + 110e625 commit 50fd85b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ImGuiFileDialog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,6 +2277,9 @@ std::string IGFD::FileManager::ComposeNewPath(std::vector<std::string>::iterator
22772277
#ifdef _IGFD_UNIX_ // _IGFD_UNIX_ is _IGFD_WIN_ or APPLE
22782278
if (res[0] != PATH_SEP)
22792279
res = PATH_SEP + res;
2280+
#else
2281+
if (res.back() != PATH_SEP)
2282+
res.push_back(PATH_SEP);
22802283
#endif // defined(_IGFD_UNIX_)
22812284
break;
22822285
}

0 commit comments

Comments
 (0)