Skip to content

Commit 6a9e926

Browse files
committed
fix: use Unix-style path seperator when launching sourcegit with cli --history <dir> (#2360)
Signed-off-by: leo <longshuang@msn.cn>
1 parent b7e4d32 commit 6a9e926

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/App.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private bool TryLaunchAsFileHistoryViewer(IClassicDesktopStyleApplicationLifetim
355355
Models.AvatarManager.Instance.Start();
356356

357357
var repo = test.StdOut.Trim();
358-
var relativePath = Path.GetRelativePath(repo, fullPath);
358+
var relativePath = Path.GetRelativePath(repo, fullPath).Replace('\\', '/');
359359
if (File.Exists(fullPath))
360360
{
361361
desktop.MainWindow = new Views.FileHistories()
@@ -367,7 +367,7 @@ private bool TryLaunchAsFileHistoryViewer(IClassicDesktopStyleApplicationLifetim
367367
{
368368
desktop.MainWindow = new Views.DirHistories()
369369
{
370-
DataContext = new ViewModels.DirHistories(repo, relativePath.TrimEnd('/', '\\'))
370+
DataContext = new ViewModels.DirHistories(repo, relativePath.TrimEnd('/'))
371371
};
372372
}
373373
else

0 commit comments

Comments
 (0)