diff options
author | Koundinya Veluri <kouvel@microsoft.com> | 2015-10-03 11:45:17 -0700 |
---|---|---|
committer | Koundinya Veluri <kouvel@microsoft.com> | 2015-10-05 10:14:25 -0700 |
commit | ca6c4a9e7b6cb893ce1a79442f5048312d7f6357 (patch) | |
tree | 90f22eb2e2ac36659629c886cde00902008bcbd4 /src/vm/appdomainnative.cpp | |
parent | 125fd8145cd2b57e6ad362910583c10b7f8a493d (diff) | |
download | coreclr-ca6c4a9e7b6cb893ce1a79442f5048312d7f6357.tar.gz coreclr-ca6c4a9e7b6cb893ce1a79442f5048312d7f6357.tar.bz2 coreclr-ca6c4a9e7b6cb893ce1a79442f5048312d7f6357.zip |
Fix loading native libraries from native search paths provided by the host
Fixed a couple of issues outside Windows regarding the directory separator char, path separator char, and absolute path determination.
Fixes #1680
Diffstat (limited to 'src/vm/appdomainnative.cpp')
-rw-r--r-- | src/vm/appdomainnative.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vm/appdomainnative.cpp b/src/vm/appdomainnative.cpp index 5e4656600e..4aa6ef42f6 100644 --- a/src/vm/appdomainnative.cpp +++ b/src/vm/appdomainnative.cpp @@ -31,6 +31,8 @@ #include "../binder/inc/clrprivbindercoreclr.h" #endif +#include "clr/fs/path.h" +using namespace clr::fs; //************************************************************************ inline AppDomain *AppDomainNative::ValidateArg(APPDOMAINREF pThis) @@ -1578,7 +1580,7 @@ void QCALLTYPE AppDomainNative::SetNativeDllSearchDirectories(__in_z LPCWSTR wsz while (itr != end) { start = itr; - BOOL found = sDirectories.Find(itr, W(';')); + BOOL found = sDirectories.Find(itr, Path::PathSeparatorChar); if (!found) { itr = end; @@ -1595,9 +1597,9 @@ void QCALLTYPE AppDomainNative::SetNativeDllSearchDirectories(__in_z LPCWSTR wsz if (len > 0) { - if (qualifiedPath[len-1]!='\\') + if (qualifiedPath[len - 1] != Path::DirectorySeparatorChar) { - qualifiedPath.Append('\\'); + qualifiedPath.Append(Path::DirectorySeparatorChar); } NewHolder<SString> stringHolder (new SString(qualifiedPath)); |