summaryrefslogtreecommitdiff
path: root/src/binder
diff options
context:
space:
mode:
authorLakshmi Priya Sekar <lasekar@microsoft.com>2015-09-21 23:32:54 -0700
committerLakshmi Priya Sekar <lasekar@microsoft.com>2015-09-25 13:50:01 -0700
commit965e5d6480ebbff3d021665f95a37cb94eb9d56a (patch)
tree6e45d8b590cb447bdd813c0fd884dd07024535cb /src/binder
parentb8282e0b7359e1abbcfdf4574621118b4f61d377 (diff)
downloadcoreclr-965e5d6480ebbff3d021665f95a37cb94eb9d56a.tar.gz
coreclr-965e5d6480ebbff3d021665f95a37cb94eb9d56a.tar.bz2
coreclr-965e5d6480ebbff3d021665f95a37cb94eb9d56a.zip
Use PathString type to allocate large path strings on linux scenario.
Respond to PR feedback. Fix test failures in mscoree.
Diffstat (limited to 'src/binder')
-rw-r--r--src/binder/assemblybinder.cpp5
-rw-r--r--src/binder/cdebuglog.cpp1
-rw-r--r--src/binder/debuglog.cpp1
-rw-r--r--src/binder/inc/bindertypes.hpp2
-rw-r--r--src/binder/utils.cpp52
5 files changed, 8 insertions, 53 deletions
diff --git a/src/binder/assemblybinder.cpp b/src/binder/assemblybinder.cpp
index 3dc1d73e96..767df5fb2b 100644
--- a/src/binder/assemblybinder.cpp
+++ b/src/binder/assemblybinder.cpp
@@ -164,7 +164,7 @@ namespace BINDER_SPACE
}
else
{
- PathString fullAssemblyPath;
+ SString fullAssemblyPath;
WCHAR *pwzFullAssemblyPath = fullAssemblyPath.OpenUnicodeBuffer(MAX_LONGPATH);
DWORD dwCCFullAssemblyPath = MAX_LONGPATH + 1; // SString allocates extra byte for null.
@@ -184,9 +184,6 @@ namespace BINDER_SPACE
{
assemblyPath.Set(fullAssemblyPath);
}
-
- // Now turn this path into our canonical representation
- CanonicalizePath(assemblyPath);
}
return hr;
diff --git a/src/binder/cdebuglog.cpp b/src/binder/cdebuglog.cpp
index 114a42ba33..329d54fcae 100644
--- a/src/binder/cdebuglog.cpp
+++ b/src/binder/cdebuglog.cpp
@@ -334,7 +334,6 @@ namespace BINDER_SPACE
CombinePath(g_BinderVariables->logPath, sCategory, logFilePath);
CombinePath(logFilePath, m_applicationName, logFilePath);
CombinePath(logFilePath, m_logFileName, logFilePath);
- CanonicalizePath(logFilePath);
BINDER_LOG_STRING(L"logFilePath", logFilePath);
diff --git a/src/binder/debuglog.cpp b/src/binder/debuglog.cpp
index 4f82b7bed9..2c4fd41bfd 100644
--- a/src/binder/debuglog.cpp
+++ b/src/binder/debuglog.cpp
@@ -90,7 +90,6 @@ namespace BINDER_SPACE
kCount2.u.HighPart);
PlatformPath(logFilePath);
- CanonicalizePath(logFilePath);
}
fFileExists = (FileOrDirectoryExists(logFilePath) == S_OK);
diff --git a/src/binder/inc/bindertypes.hpp b/src/binder/inc/bindertypes.hpp
index 62c6fa61e0..6fc4574e0f 100644
--- a/src/binder/inc/bindertypes.hpp
+++ b/src/binder/inc/bindertypes.hpp
@@ -32,8 +32,6 @@ class PEAssembly;
namespace BINDER_SPACE
{
- typedef InlineSString<512> PathString;
-
class AssemblyVersion;
class AssemblyName;
class Assembly;
diff --git a/src/binder/utils.cpp b/src/binder/utils.cpp
index a8e5cbc3e9..a6a506d937 100644
--- a/src/binder/utils.cpp
+++ b/src/binder/utils.cpp
@@ -260,40 +260,6 @@ namespace BINDER_SPACE
BINDER_LOG_LEAVE(W("Utils::PlatformPath"));
}
- void CanonicalizePath(SString &path, BOOL fAppendPathSeparator)
- {
- BINDER_LOG_ENTER(W("Utils::CanonicalizePath"));
- BINDER_LOG_STRING(W("input path"), path);
-
- if (!path.IsEmpty())
- {
- PathString wszCanonicalPathString;
- WCHAR * pwszCanonicalPath = wszCanonicalPathString.OpenUnicodeBuffer(MAX_LONGPATH);
- PlatformPath(path);
-
- // This is also defined in rotor pal
- if (PathCanonicalizeW(pwszCanonicalPath, path))
- {
- path.Set(pwszCanonicalPath);
- }
-
- wszCanonicalPathString.CloseBuffer();
-
- if (fAppendPathSeparator)
- {
- SString platformPathSeparator(SString::Literal, GetPlatformPathSeparator());
-
- if (!path.EndsWith(platformPathSeparator))
- {
- path.Append(platformPathSeparator);
- }
- }
- }
-
- BINDER_LOG_STRING(W("canonicalized path"), path);
- BINDER_LOG_LEAVE(W("Utils::CanonicalizePath"));
- }
-
void CombinePath(SString &pathA,
SString &pathB,
SString &combinedPath)
@@ -303,20 +269,16 @@ namespace BINDER_SPACE
BINDER_LOG_STRING(W("path A"), pathA);
BINDER_LOG_STRING(W("path B"), pathB);
- PathString tempResultPathString;
- WCHAR * tempResultPath = tempResultPathString.OpenUnicodeBuffer(MAX_LONGPATH);
-
- if (PathCombineW(tempResultPath, pathA, pathB))
- {
- combinedPath.Set(tempResultPath);
- BINDER_LOG_STRING(W("combined path"), tempResultPath);
- }
- else
+ SString platformPathSeparator(SString::Literal, GetPlatformPathSeparator());
+ combinedPath.Set(pathA);
+
+ if (!combinedPath.EndsWith(platformPathSeparator))
{
- combinedPath.Clear();
+ combinedPath.Append(platformPathSeparator);
}
- tempResultPathString.CloseBuffer();
+ combinedPath.Append(pathB);
+
BINDER_LOG_LEAVE(W("Utils::CombinePath"));
}