diff --git a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs index df2048d2dd..f14be3b3e1 100644 --- a/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs +++ b/src/BizHawk.Client.Common/config/PathEntryCollectionExtensions.cs @@ -121,16 +121,25 @@ private static string AbsolutePathForInner(this PathEntryCollection collection, return path; } - if (path.IsAbsolute()) +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER + bool isAbsolute = path.IsAbsolute(); +#else + bool isAbsolute; + try { - return path; + isAbsolute = path.IsAbsolute(); + } + catch + { + isAbsolute = false; } +#endif //handling of initial .. was removed (Path.GetFullPath can handle it) //handling of file:// or file:\\ was removed (can Path.GetFullPath handle it? not sure) // all bad paths default to EXE - return PathUtils.ExeDirectoryPath; + return isAbsolute ? path : PathUtils.ExeDirectoryPath; } public static string MovieAbsolutePath(this PathEntryCollection collection)