Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/core/IronPython/Runtime/Types/DocBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,14 +555,14 @@ private static XPathDocument GetXPathDocument(Assembly asm) {

string baseDir = Path.GetDirectoryName(location);
string baseFile = Path.GetFileNameWithoutExtension(location) + ".xml";
string xml = Path.Combine(Path.Combine(baseDir, ci.Name), baseFile);
string xml = Path.Combine(baseDir, ci.Name, baseFile);

bool isRef = false;

if (!File.Exists(xml)) {
int hyphen = ci.Name.IndexOf('-');
if (hyphen != -1) {
xml = Path.Combine(Path.Combine(baseDir, ci.Name.Substring(0, hyphen)), baseFile);
xml = Path.Combine(baseDir, ci.Name.Substring(0, hyphen), baseFile);
}
if (!File.Exists(xml)) {
xml = Path.Combine(baseDir, baseFile);
Expand All @@ -571,10 +571,8 @@ private static XPathDocument GetXPathDocument(Assembly asm) {
// On .NET 4.0 documentation is in the reference assembly location
// for 64-bit processes, we need to look in Program Files (x86)
xml = Path.Combine(
Path.Combine(
Environment.GetFolderPath(Environment.Is64BitProcess ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles),
_frameworkReferencePath
),
Environment.GetFolderPath(Environment.Is64BitProcess ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles),
_frameworkReferencePath,
baseFile
);
isRef = true;
Expand Down
2 changes: 1 addition & 1 deletion tests/IronPython.Tests/EngineTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public void ScenarioCodePlex20472() {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#endif
// This test file is encoded in Windows codepage 1251 (Cyrilic) but lacks a magic comment (PEP-263)
string fileName = Path.Combine(Path.Combine(Common.ScriptTestDirectory, "encoded_files"), "cp20472.py");
string fileName = Path.Combine(Common.ScriptTestDirectory, "encoded_files", "cp20472.py");
try {
_pe.CreateScriptSourceFromFile(fileName).Compile();

Expand Down
Loading