Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed issue where the startup settings was ignored when launched from terminal #11866

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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