未验证 提交 dfeb707f 编写于 作者: R Ryan Lucia 提交者: GitHub

[mono] Remove support for "file://" URIs when loading assemblies (#51727)

This functionality was removed as part of .NET Core, see https://github.com/dotnet/docs/issues/19944 for more info
上级 2205465e
......@@ -1934,34 +1934,7 @@ mono_assembly_request_open (const char *filename, const MonoAssemblyOpenRequest
status = &def_status;
*status = MONO_IMAGE_OK;
if (strncmp (filename, "file://", 7) == 0) {
GError *gerror = NULL;
gchar *uri = (gchar *) filename;
gchar *tmpuri;
/*
* MS allows file://c:/... and fails on file://localhost/c:/...
* They also throw an IndexOutOfRangeException if "file://"
*/
if (uri [7] != '/')
uri = g_strdup_printf ("file:///%s", uri + 7);
tmpuri = uri;
uri = mono_escape_uri_string (tmpuri);
fname = g_filename_from_uri (uri, NULL, &gerror);
g_free (uri);
if (tmpuri != filename)
g_free (tmpuri);
if (gerror != NULL) {
g_warning ("%s\n", gerror->message);
g_error_free (gerror);
fname = g_strdup (filename);
}
} else {
fname = g_strdup (filename);
}
fname = g_strdup (filename);
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY,
"Assembly Loader probing location: '%s'.", fname);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册