Skip to content

Commit e2028bc

Browse files
author
diehy
authored
Fixed broken output_log path (#50)
Being given the option for Doorstop to automatically redirect the output log is neat, and it saves me from running additional code to patch mainData for the redirect. However, the path used for it is clearly incorrect, and I've noticed that it isn't just an issue for me: #39 After having a quick peek it appears that the wrong path variable is being used for the absolute directory path, resulting in it being trimmed early due to the filename length being short.
1 parent fadccd0 commit e2028bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/windows/entrypoint.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void redirect_output_log(DoorstopPaths const *paths) {
104104
return;
105105

106106
char_t *cmd = GetCommandLine();
107-
size_t app_dir_len = strlen(paths->doorstop_filename);
107+
size_t app_dir_len = strlen(paths->app_dir);
108108
size_t cmd_len = strlen(cmd);
109109
size_t new_cmd_len = cmd_len + LOG_FILE_CMD_START_LEN + app_dir_len +
110110
LOG_FILE_CMD_END_LEN + LOG_FILE_CMD_EXTRA;
@@ -207,4 +207,4 @@ BOOL WINAPI DllEntry(HINSTANCE hInstDll, DWORD reasonForDllLoad,
207207
paths_free(paths);
208208

209209
return TRUE;
210-
}
210+
}

0 commit comments

Comments
 (0)