fix: search directory

This commit is contained in:
ikpil 2023-09-21 23:13:39 +09:00
parent bfa20b41e8
commit 25bc69f2e4
1 changed files with 4 additions and 4 deletions

View File

@ -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)