AccessLink Refactor

This commit is contained in:
01Dri 2025-05-25 02:34:48 -03:00
parent 5bae202031
commit 59d5cd62bc

View file

@ -9,21 +9,20 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
public string Path { get; set; } public string Path { get; set; }
public ResultType Type { get; set; } = ResultType.Folder; public ResultType Type { get; set; } = ResultType.Folder;
[JsonIgnore] public string Name { get; set; }
public string Name
private string GetPathName()
{ {
get var path = Path.EndsWith(Constants.DirectorySeparator) ? Path[0..^1] : Path;
{
var path = Path.EndsWith(Constants.DirectorySeparator) ? Path[0..^1] : Path;
if (path.EndsWith(':')) if (path.EndsWith(':'))
return path[0..^1] + " Drive"; return path[0..^1] + " Drive";
return path.Split(new[] { System.IO.Path.DirectorySeparatorChar }, StringSplitOptions.None) return path.Split(new[] { System.IO.Path.DirectorySeparatorChar }, StringSplitOptions.None)
.Last(); .Last();
}
} }
} }
} }