Revert "Fix nullability warnings in PathExtensions"

This reverts commit f022954554.
This commit is contained in:
adelikat 2020-03-19 08:50:45 -05:00
parent d60a00d682
commit c731e1168e
1 changed files with 1 additions and 3 deletions

View File

@ -78,7 +78,6 @@ namespace BizHawk.Common.PathExtensions
// zero 06-nov-2015 - regarding the below, i changed my mind. for libretro i want subdirectories here.
var filesystemDir = Path.GetDirectoryName(filesystemSafeName);
if (string.IsNullOrEmpty(filesystemDir)) throw new Exception();
filesystemSafeName = Path.GetFileName(filesystemSafeName);
filesystemSafeName = filesystemSafeName.RemoveInvalidFileSystemChars();
@ -115,8 +114,7 @@ namespace BizHawk.Common.PathExtensions
{
public static string GetExeDirectoryAbsolute()
{
var path = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
if (string.IsNullOrEmpty(path)) throw new Exception();
var path = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
if (path.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
path = path.Remove(path.Length - 1, 1);