forked from mirror/DotRecast
fix: search directory
This commit is contained in:
parent
bfa20b41e8
commit
25bc69f2e4
|
@ -34,13 +34,13 @@ namespace DotRecast.Core
|
||||||
public static string SearchDirectory(string dirname, int depth = 10)
|
public static string SearchDirectory(string dirname, int depth = 10)
|
||||||
{
|
{
|
||||||
var searchingPath = SearchPath(dirname, depth, out var isDir);
|
var searchingPath = SearchPath(dirname, depth, out var isDir);
|
||||||
if (!isDir)
|
if (isDir)
|
||||||
{
|
{
|
||||||
var path = Path.GetDirectoryName(searchingPath) ?? string.Empty;
|
return searchingPath;
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
var path = Path.GetDirectoryName(searchingPath) ?? string.Empty;
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string SearchFile(string filename, int depth = 10)
|
public static string SearchFile(string filename, int depth = 10)
|
||||||
|
|
Loading…
Reference in New Issue