From 25bc69f2e45986042e6d8f97595ee1a8d5974918 Mon Sep 17 00:00:00 2001 From: ikpil Date: Thu, 21 Sep 2023 23:13:39 +0900 Subject: [PATCH] fix: search directory --- src/DotRecast.Core/RcDirectory.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DotRecast.Core/RcDirectory.cs b/src/DotRecast.Core/RcDirectory.cs index 7745a53..46a5362 100644 --- a/src/DotRecast.Core/RcDirectory.cs +++ b/src/DotRecast.Core/RcDirectory.cs @@ -34,13 +34,13 @@ namespace DotRecast.Core public static string SearchDirectory(string dirname, int depth = 10) { var searchingPath = SearchPath(dirname, depth, out var isDir); - if (!isDir) + if (isDir) { - var path = Path.GetDirectoryName(searchingPath) ?? string.Empty; - return path; + return searchingPath; } - return string.Empty; + var path = Path.GetDirectoryName(searchingPath) ?? string.Empty; + return path; } public static string SearchFile(string filename, int depth = 10)