Skip to content

Commit 221e964

Browse files
committed
code_review: PR #1442
Trim both `\` (on Windows) and `/` (on Linux/macOS) characters at the end of path Signed-off-by: leo <[email protected]>
1 parent 20daa58 commit 221e964

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Views/AddWorktree.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private async void SelectLocation(object _, RoutedEventArgs e)
2626
{
2727
var folder = selected[0];
2828
var folderPath = folder is { Path: { IsAbsoluteUri: true } path } ? path.LocalPath : folder?.Path.ToString();
29-
TxtLocation.Text = folderPath.TrimEnd('\\');
29+
TxtLocation.Text = folderPath.TrimEnd(['\\', '/']);
3030
}
3131
}
3232
catch (Exception exception)

0 commit comments

Comments
 (0)