mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2025-02-09 13:14:46 +01:00
Give a better error in LocalFileSystem when trying to initialize it with a file
This commit is contained in:
parent
fcf46b1822
commit
f99bc3e0fe
@ -21,6 +21,11 @@ namespace LibHac.FsSystem
|
||||
|
||||
if (!Directory.Exists(BasePath))
|
||||
{
|
||||
if (File.Exists(BasePath))
|
||||
{
|
||||
throw new DirectoryNotFoundException($"The specified path is a file. ({basePath})");
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(BasePath);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user