Skip to content

Commit

Permalink
'-nosession' must not overwrite config.xml (Fix #3938)
Browse files Browse the repository at this point in the history
When `-nosession` is given as a command line parameter the attribute
`isSnapshotMode` in `config.xml` is overwritten with `no` regardless of
its original value.

    <GUIConfig name="Backup" action="0" useCustumDir="no"
               dir="" isSnapshotMode="yes" snapshotBackupTiming="7000" />

Change this to keep the original value.

Fix #3938, close #5845
  • Loading branch information
Micha Wiedenmann authored and donho committed Aug 2, 2019
1 parent 9f1deb4 commit b3a6638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PowerEditor/src/Parameters.cpp
Expand Up @@ -5662,7 +5662,7 @@ void NppParameters::createXmlTreeFromGUIParams()
GUIConfigElement->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());

GUIConfigElement->SetAttribute(TEXT("isSnapshotMode"), _nppGUI.isSnapshotMode() ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("isSnapshotMode"), _nppGUI._isSnapshotMode ? TEXT("yes") : TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("snapshotBackupTiming"), static_cast<int32_t>(_nppGUI._snapshotBackupTiming));
}

Expand Down

0 comments on commit b3a6638

Please sign in to comment.