Skip to content

Commit 710cef8

Browse files
committed
Do not always add the parent folder of the target in the mono search path
1 parent 0b6b23d commit 710cef8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/bootstrap.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ void *init_mono(const char *root_domain_name, const char *runtime_version) {
134134
LOG("Overriding mono DLL search path");
135135

136136
size_t mono_search_path_len = strlen(root_dir) + 1;
137-
char_t *target_path_full = get_full_path(config.target_assembly);
138-
char_t *target_path_folder = get_folder_name(target_path_full);
139-
mono_search_path_len += strlen(target_path_folder) + 1;
140-
LOG("Adding %s to mono search path", target_path_folder);
141137

142138
char_t *override_dir_full = NULL;
143139
bool_t has_override = config.mono_dll_search_path_override &&
@@ -153,8 +149,6 @@ void *init_mono(const char *root_domain_name, const char *runtime_version) {
153149
strcat(mono_search_path, override_dir_full);
154150
strcat(mono_search_path, PATH_SEP);
155151
}
156-
strcat(mono_search_path, target_path_folder);
157-
strcat(mono_search_path, PATH_SEP);
158152
strcat(mono_search_path, root_dir);
159153

160154
LOG("Mono search path: %s", mono_search_path);
@@ -166,8 +160,6 @@ void *init_mono(const char *root_domain_name, const char *runtime_version) {
166160
if (override_dir_full) {
167161
free(override_dir_full);
168162
}
169-
free(target_path_full);
170-
free(target_path_folder);
171163

172164
hook_mono_jit_parse_options(0, NULL);
173165

0 commit comments

Comments
 (0)