summaryrefslogtreecommitdiff
path: root/src/binder
diff options
context:
space:
mode:
authorJohn Chen <jochen@microsoft.com>2016-05-18 02:46:23 -0700
committerJan Kotas <jkotas@microsoft.com>2016-05-18 02:46:23 -0700
commitacd2bba2231e07f006846b44e790c5073d7c6019 (patch)
tree37e1b85f545e3bed98d8409b60f323d50c3bb3ba /src/binder
parent7e9bd0570ed853e7fcf524537388b1bc43ce086f (diff)
downloadcoreclr-acd2bba2231e07f006846b44e790c5073d7c6019.tar.gz
coreclr-acd2bba2231e07f006846b44e790c5073d7c6019.tar.bz2
coreclr-acd2bba2231e07f006846b44e790c5073d7c6019.zip
Fix crossgen /createpdb when input filename is given without path (#5045)
Fix a bug in "crossgen /createpdb" command that can cause it to fail if the input filename is given without a path.
Diffstat (limited to 'src/binder')
-rw-r--r--src/binder/applicationcontext.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/binder/applicationcontext.cpp b/src/binder/applicationcontext.cpp
index 27f860e927..e5c3025787 100644
--- a/src/binder/applicationcontext.cpp
+++ b/src/binder/applicationcontext.cpp
@@ -265,8 +265,17 @@ namespace BINDER_SPACE
if (!fileName.FindBack(iSimpleNameStart, DIRECTORY_SEPARATOR_CHAR_W))
{
+#ifdef CROSSGEN_COMPILE
+ iSimpleNameStart = fileName.Begin();
+#else
// Couldn't find a directory separator. File must have been specified as a relative path. Not allowed.
GO_WITH_HRESULT(E_INVALIDARG);
+#endif
+ }
+ else
+ {
+ // Advance past the directory separator to the first character of the file name
+ iSimpleNameStart++;
}
if (iSimpleNameStart == fileName.End())
@@ -274,9 +283,6 @@ namespace BINDER_SPACE
GO_WITH_HRESULT(E_INVALIDARG);
}
- // Advance past the directory separator to the first character of the file name
- iSimpleNameStart++;
-
SString simpleName;
bool isNativeImage = false;