File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Flow.Launcher.Plugin/SharedCommands Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -208,22 +208,16 @@ public static bool IsLocationPathString(this string querySearchString)
208208 ///</summary>
209209 public static string GetPreviousExistingDirectory ( Func < string , bool > locationExists , string path )
210210 {
211- var previousDirectoryPath = "" ;
212211 var index = path . LastIndexOf ( '\\ ' ) ;
213212 if ( index > 0 && index < ( path . Length - 1 ) )
214213 {
215- previousDirectoryPath = path . Substring ( 0 , index + 1 ) ;
216- if ( ! locationExists ( previousDirectoryPath ) )
217- {
218- return "" ;
219- }
214+ string previousDirectoryPath = path . Substring ( 0 , index + 1 ) ;
215+ return locationExists ( previousDirectoryPath ) ? previousDirectoryPath : "" ;
220216 }
221217 else
222218 {
223219 return "" ;
224220 }
225-
226- return previousDirectoryPath ;
227221 }
228222
229223 ///<summary>
You can’t perform that action at this time.
0 commit comments