Skip to content

Commit

Permalink
Fixed condition another time
Browse files Browse the repository at this point in the history
Thanks @Qiuu for paying attention!
  • Loading branch information
bjorn committed May 20, 2020
1 parent ed34366 commit c337f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tiled/scriptfile.cpp
Expand Up @@ -218,7 +218,7 @@ ScriptTextFile::ScriptTextFile(const QString &filePath, OpenMode mode)
if (mode & Append)
m |= QIODevice::Append;

if ((m & QIODevice::WriteOnly) && SaveFile::safeSavingEnabled())
if (m == (QIODevice::Text | QIODevice::WriteOnly) && SaveFile::safeSavingEnabled())
m_file.reset(new QSaveFile(filePath));
else
m_file.reset(new QFile(filePath));
Expand Down

0 comments on commit c337f01

Please sign in to comment.