From 470ee11c8feaf305ecd9e8b9497852f86a4514d6 Mon Sep 17 00:00:00 2001 From: Kai-Chu Chung Date: Sun, 22 Oct 2023 23:04:10 +0800 Subject: [PATCH] fix(alfred): buildPath ModeSymlink path mapping fail --- alfred/alfred.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/alfred/alfred.go b/alfred/alfred.go index eb38b82..ceb6e8e 100644 --- a/alfred/alfred.go +++ b/alfred/alfred.go @@ -174,14 +174,11 @@ func (a *Alfred) GetExistingLink() (string, error) { return "", err } - wd, _ := os.Getwd() - buildPath := path.Join(wd, a.BuildDir) - for _, dir := range dirs { if dir.Mode()&os.ModeSymlink == os.ModeSymlink { fullDir := path.Join(a.WorkflowsPath, dir.Name()) link, err := filepath.EvalSymlinks(fullDir) - if err == nil && link == buildPath { + if err == nil && link == a.BuildDir { return fullDir, nil } }