mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +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
1 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,11 @@ namespace LibHac.FsSystem
|
||||||
|
|
||||||
if (!Directory.Exists(BasePath))
|
if (!Directory.Exists(BasePath))
|
||||||
{
|
{
|
||||||
|
if (File.Exists(BasePath))
|
||||||
|
{
|
||||||
|
throw new DirectoryNotFoundException($"The specified path is a file. ({basePath})");
|
||||||
|
}
|
||||||
|
|
||||||
Directory.CreateDirectory(BasePath);
|
Directory.CreateDirectory(BasePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue