diff --git a/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp b/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp index b8ad0bb25..027081285 100644 --- a/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp +++ b/PowerEditor/src/WinControls/OpenSaveFileDialog/CustomFileDialog.cpp @@ -505,7 +505,7 @@ private: expandEnv(fileName); bool nameChanged = transformPath(fileName); // Update the controls. - if (doesDirectoryExist(getAbsPath(fileName).c_str())) + if (!doesDirectoryExist(getAbsPath(fileName).c_str())) { // Name is a file path. // Add file extension if missing.