aiekick / ImGuiFileDialog

Full featured file Dialog for Dear ImGui
MIT License
1.25k stars 202 forks source link

Fix: prevent possible relative path on non-UNIX systems (Windows) #154

Closed conhlee closed 11 months ago

conhlee commented 11 months ago

Appends PATH_SEP to IGFD::FileManager::ComposeNewPath result on non-UNIX systems (Windows) to prevent possible relative path

aiekick commented 11 months ago

Hello,

not sure to understand the issue you have.

can you explain more please ?

conhlee commented 11 months ago

Hi,

On Windows systems, a path such as E: is treated as a relative path and is appended to the current working directory. For instance, if your working directory is C:\Dir1\Dir2 and you attempt to navigate to E:, the resulting path will be C:\Dir1\Dir2\E:. So to fix this the path separator is concatenated to the path if not already present.

aiekick commented 11 months ago

so only when you try to select a directory. right ?

conhlee commented 11 months ago

The issue mainly occurs when selecting a drive