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)
208
208
///</summary>
209
209
public static string GetPreviousExistingDirectory ( Func < string , bool > locationExists , string path )
210
210
{
211
- var previousDirectoryPath = "" ;
212
211
var index = path . LastIndexOf ( '\\ ' ) ;
213
212
if ( index > 0 && index < ( path . Length - 1 ) )
214
213
{
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 : "" ;
220
216
}
221
217
else
222
218
{
223
219
return "" ;
224
220
}
225
-
226
- return previousDirectoryPath ;
227
221
}
228
222
229
223
///<summary>
You can’t perform that action at this time.
0 commit comments