We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03670d6 commit 73d0231Copy full SHA for 73d0231
1 file changed
gui/desktop/mainwindow.cpp
@@ -1239,7 +1239,8 @@ void MainWindow::on_randomize_button_clicked()
1239
}
1240
1241
// Check to make sure the output directory is not the same or a sub directory of the base game
1242
- if (config.outputDir.u32string().starts_with(config.gameBaseDir.u32string()))
+ const fspath& base = std::filesystem::weakly_canonical(config.gameBaseDir);
1243
+ if (std::ranges::mismatch(base, std::filesystem::weakly_canonical(config.outputDir)).in1 == base.end())
1244
{
1245
show_warning_dialog("The output folder cannot be within the base game folder. Please select a different output folder.", "Bad output folder");
1246
return;
0 commit comments