IsPathRooted -> IsAbsolute
This is most likely more correct. .net framework does not have a dedicated method for checking absolute paths, so this was most likely accidentally used instead.
This commit is contained in:
parent
a43a64b899
commit
7b2de12de3
|
@ -29,14 +29,14 @@ namespace BizHawk.Client.Common
|
||||||
globalBase = PathUtils.ExeDirectoryPath + globalBase.Substring(5);
|
globalBase = PathUtils.ExeDirectoryPath + globalBase.Substring(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rooted paths get returned without change
|
// absolute paths get returned without change
|
||||||
// (this is done after keyword substitution to avoid problems though)
|
// (this is done after keyword substitution to avoid problems though)
|
||||||
if (Path.IsPathRooted(globalBase))
|
if (globalBase.IsAbsolute())
|
||||||
{
|
{
|
||||||
return globalBase;
|
return globalBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not-rooted things are relative to exe path
|
// non-absolute things are relative to exe path
|
||||||
globalBase = Path.Combine(PathUtils.ExeDirectoryPath, globalBase);
|
globalBase = Path.Combine(PathUtils.ExeDirectoryPath, globalBase);
|
||||||
return globalBase;
|
return globalBase;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ namespace BizHawk.Client.Common
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Path.IsPathRooted(path))
|
if (path.IsAbsolute())
|
||||||
{
|
{
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -327,7 +327,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
private static string ResolveToolsPath(this PathEntryCollection collection, string subPath)
|
private static string ResolveToolsPath(this PathEntryCollection collection, string subPath)
|
||||||
{
|
{
|
||||||
if (Path.IsPathRooted(subPath) || subPath.StartsWith('%')) return subPath;
|
if (subPath.IsAbsolute() || subPath.StartsWith('%')) return subPath;
|
||||||
|
|
||||||
var toolsPath = collection[PathEntryCollection.GLOBAL, "Tools"].Path;
|
var toolsPath = collection[PathEntryCollection.GLOBAL, "Tools"].Path;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue