Skip to content

Commit

Permalink
Fix: Fixed issue where the startup settings was ignored when launched…
Browse files Browse the repository at this point in the history
… from terminal (#11866)
  • Loading branch information
hishitetsu authored Mar 28, 2023
1 parent 492f169 commit 4e096d7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Files.App/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ public async Task InitializeApplication(object activatedEventArgs)
// WINUI3 bug: when launching from commandline the argument is not ICommandLineActivatedEventArgs (#10370)
var ppm = CommandLineParser.ParseUntrustedCommands(launchArgs.Arguments);
if (ppm.IsEmpty())
{
ppm = new ParsedCommands() { new ParsedCommand() { Type = ParsedCommandType.Unknown, Args = new() { "." } } };
}
await InitializeFromCmdLineArgs(rootFrame, ppm);
rootFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
else
await InitializeFromCmdLineArgs(rootFrame, ppm);
}
else if (rootFrame.Content is null)
{
Expand Down Expand Up @@ -123,10 +122,9 @@ public async Task InitializeApplication(object activatedEventArgs)
case "cmd":
var ppm = CommandLineParser.ParseUntrustedCommands(unescapedValue);
if (ppm.IsEmpty())
{
ppm = new ParsedCommands() { new ParsedCommand() { Type = ParsedCommandType.Unknown, Args = new() { "." } } };
}
await InitializeFromCmdLineArgs(rootFrame, ppm);
rootFrame.Navigate(typeof(MainPage), null, new SuppressNavigationTransitionInfo());
else
await InitializeFromCmdLineArgs(rootFrame, ppm);
break;
}
}
Expand Down

0 comments on commit 4e096d7

Please sign in to comment.