This commit is contained in:
DavidXanatos 2022-12-28 18:53:25 +01:00
parent 3b90c9ee6c
commit cb5043490a
2 changed files with 8 additions and 3 deletions

View File

@ -12,7 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- fixed issue with auto delete sandbox on SandMan startup [#2555](https://github.com/sandboxie-plus/Sandboxie/issues/2555)
- fixed issue with Windows 11 context menu when SandMan was not already running [#2284](https://github.com/sandboxie-plus/Sandboxie/issues/2284)
- fixed issue with the display about cmbDefault [#2560](https://github.com/sandboxie-plus/Sandboxie/pull/2560) (okrc)
- fixed issuw with templates.ini loading on first start [#2574](https://github.com/sandboxie-plus/Sandboxie/issues/2574)

View File

@ -204,7 +204,7 @@ _FX NTSTATUS Conf_Read(ULONG session_id)
ULONG path_len;
WCHAR *path = NULL;
BOOLEAN path_home;
STREAM *stream;
STREAM *stream = NULL;
POOL *pool;
//
@ -247,6 +247,7 @@ _FX NTSTATUS Conf_Read(ULONG session_id)
status == STATUS_OBJECT_PATH_NOT_FOUND)
{
Log_Msg_Session(MSG_CONF_NO_FILE, NULL, NULL, session_id);
status = STATUS_SUCCESS; // we need to continue and load the Templates.ini with the defaults
} else {
wcscpy(linenum_str, L"(none)");
Log_Status_Ex_Session(
@ -281,6 +282,8 @@ _FX NTSTATUS Conf_Read(ULONG session_id)
data.home = path_home;
data.use_count = 0;
if (stream) {
status = Stream_Read_BOM(stream, &data.encoding);
linenum = 1;
@ -288,9 +291,10 @@ _FX NTSTATUS Conf_Read(ULONG session_id)
status = Conf_Read_Sections(stream, &data, &linenum);
if (status == STATUS_END_OF_FILE)
status = STATUS_SUCCESS;
}
}
Stream_Close(stream);
if (stream) Stream_Close(stream);
//
// read (Home Path)\Templates.ini