Skip to content

Commit 255138f

Browse files
committed
refactor: use DirectoryInfo to get absolute path of repository (#2246)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 03bfa29 commit 255138f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Views/LauncherTabBar.axaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23

34
using Avalonia;
45
using Avalonia.Controls;
@@ -298,7 +299,8 @@ private void OnTabContextRequested(object sender, ContextRequestedEventArgs e)
298299
copyPath.Icon = this.CreateMenuIcon("Icons.Copy");
299300
copyPath.Click += async (_, ev) =>
300301
{
301-
await this.CopyTextAsync(repo.FullPath);
302+
var dir = new DirectoryInfo(repo.FullPath);
303+
await this.CopyTextAsync(dir.FullName);
302304
ev.Handled = true;
303305
};
304306
menu.Items.Add(copyPath);

0 commit comments

Comments
 (0)