Skip to content

Commit 841e1e0

Browse files
fix did you delete this folder dialog after update
1 parent 2382d81 commit 841e1e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Files.App/MainWindow.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
using Microsoft.UI.Windowing;
77
using Microsoft.UI.Xaml.Controls;
88
using Microsoft.UI.Xaml.Media.Animation;
9+
using System.IO;
910
using System.Runtime.InteropServices;
11+
using Windows.ApplicationModel;
1012
using Windows.ApplicationModel.Activation;
1113
using Windows.Storage;
1214
using IO = System.IO;
@@ -63,8 +65,10 @@ public async Task InitializeApplicationAsync(object activatedEventArgs)
6365
case ILaunchActivatedEventArgs launchArgs:
6466
if (launchArgs.Arguments is not null &&
6567
(CommandLineParser.SplitArguments(launchArgs.Arguments, true)[0].EndsWith($"files-dev.exe", StringComparison.OrdinalIgnoreCase)
66-
|| CommandLineParser.SplitArguments(launchArgs.Arguments, true)[0].EndsWith($"files-dev", StringComparison.OrdinalIgnoreCase)))
68+
|| CommandLineParser.SplitArguments(launchArgs.Arguments, true)[0].EndsWith($"files-dev", StringComparison.OrdinalIgnoreCase)
69+
|| CommandLineParser.SplitArguments(launchArgs.Arguments, true)[0].Equals(Path.Join(Package.Current.InstalledLocation.Path, "Files.App", "Files.exe"), StringComparison.OrdinalIgnoreCase)))
6770
{
71+
Logger.LogInformation($"1 {launchArgs.Arguments}");
6872
// WINUI3: When launching from commandline the argument is not ICommandLineActivatedEventArgs (#10370)
6973
var ppm = CommandLineParser.ParseUntrustedCommands(launchArgs.Arguments);
7074
if (ppm.IsEmpty())

src/Files.App/Utils/CommandLine/CommandLineParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public sealed class CommandLineParser
1717
/// <returns>A collection of parsed command.</returns>
1818
public static ParsedCommands ParseUntrustedCommands(string cmdLineString)
1919
{
20-
var parsedArgs = Parse(SplitArguments(cmdLineString, true));
20+
var parsedArgs = Parse(SplitArguments(cmdLineString.TrimEnd(), true));
2121

2222
return ParseSplitArguments(parsedArgs);
2323
}

0 commit comments

Comments
 (0)