Skip to content

Commit d85f709

Browse files
committed
enhance: trim the end path seperator
Signed-off-by: leo <longshuang@msn.cn>
1 parent 51d4f7a commit d85f709

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/App.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private bool TryLaunchAsFileHistoryViewer(IClassicDesktopStyleApplicationLifetim
367367
{
368368
desktop.MainWindow = new Views.DirHistories()
369369
{
370-
DataContext = new ViewModels.DirHistories(repo, relativePath)
370+
DataContext = new ViewModels.DirHistories(repo, relativePath.TrimEnd('/', '\\'))
371371
};
372372
}
373373
else

src/ViewModels/DirHistories.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public DirHistories(string repoPath, string dir)
8080
Title = dir;
8181

8282
var gitDir = new Commands.QueryGitDir(repoPath).GetResult();
83-
_repo = new Repository(true, repoPath, gitDir);
83+
_repo = new Repository(true, repoPath, gitDir); // Trait repository as a bare repository to disable some file operations.
8484
_repo.RefreshBranches();
8585

8686
_detail = new CommitDetail(_repo, null);

0 commit comments

Comments
 (0)