File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Flow.Launcher.Plugin/Interfaces Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -233,8 +233,8 @@ public interface IPublicAPI
233
233
/// Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer
234
234
/// </summary>
235
235
/// <param name="DirectoryPath">Directory Path to open</param>
236
- /// <param name="FileName ">Extra FileName Info</param>
237
- public void OpenDirectory ( string DirectoryPath , string FileName = null ) ;
236
+ /// <param name="FileNameOrFilePath ">Extra FileName Info</param>
237
+ public void OpenDirectory ( string DirectoryPath , string FileNameOrFilePath = null ) ;
238
238
239
239
/// <summary>
240
240
/// Opens the URL with the given Uri object.
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Net ;
@@ -195,17 +195,20 @@ public void SavePluginSettings()
195
195
( ( PluginJsonStorage < T > ) _pluginJsonStorages [ type ] ) . Save ( ) ;
196
196
}
197
197
198
- public void OpenDirectory ( string DirectoryPath , string FileName = null )
198
+ public void OpenDirectory ( string DirectoryPath , string FileNameOrFilePath = null )
199
199
{
200
200
using var explorer = new Process ( ) ;
201
201
var explorerInfo = _settingsVM . Settings . CustomExplorer ;
202
202
explorer . StartInfo = new ProcessStartInfo
203
203
{
204
204
FileName = explorerInfo . Path ,
205
- Arguments = FileName is null ?
206
- explorerInfo . DirectoryArgument . Replace ( "%d" , DirectoryPath ) :
207
- explorerInfo . FileArgument . Replace ( "%d" , DirectoryPath ) . Replace ( "%f" ,
208
- Path . IsPathRooted ( FileName ) ? FileName : Path . Combine ( DirectoryPath , FileName ) )
205
+ Arguments = FileNameOrFilePath is null
206
+ ? explorerInfo . DirectoryArgument . Replace ( "%d" , DirectoryPath )
207
+ : explorerInfo . FileArgument
208
+ . Replace ( "%d" , DirectoryPath )
209
+ . Replace ( "%f" ,
210
+ Path . IsPathRooted ( FileNameOrFilePath ) ? FileNameOrFilePath : Path . Combine ( DirectoryPath , FileNameOrFilePath )
211
+ )
209
212
} ;
210
213
explorer . Start ( ) ;
211
214
}
You can’t perform that action at this time.
0 commit comments