Skip to content

Commit

Permalink
Fix editor saving to downloadedmaps when loading current map
Browse files Browse the repository at this point in the history
When loading a map from the `downloadedmaps` folder with the editor file browser it was already correctly ensured that the map cannot be saved again to this folder, but this was not checked when the current map is loaded directly from the `downloadedmaps` folder with the "Load current map" function.

Closes ddnet#9529.
  • Loading branch information
Robyt3 committed Jan 17, 2025
1 parent 2b1cc28 commit 11fa609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8910,7 +8910,7 @@ void CEditor::LoadCurrentMap()
{
if(Load(m_pClient->GetCurrentMapPath(), IStorage::TYPE_SAVE))
{
m_ValidSaveFilename = true;
m_ValidSaveFilename = !str_startswith(m_pClient->GetCurrentMapPath(), "downloadedmaps/");
}
else
{
Expand Down

0 comments on commit 11fa609

Please sign in to comment.