Skip to content

Commit

Permalink
fix: relative path symlink navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ALX99 committed Jun 1, 2024
1 parent c649796 commit a3b5513
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/models/main_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
}

// If the symlink is relative, we need to resolve it
if !filepath.IsAbs(path) {

Check failure on line 141 in internal/models/main_model.go

View workflow job for this annotation

GitHub Actions / build

undefined: filepath
path = filepath.Join(m.cwd, path)

Check failure on line 142 in internal/models/main_model.go

View workflow job for this annotation

GitHub Actions / build

undefined: filepath
}

info, err := os.Stat(path)
if err != nil {
m.lastError = err
Expand Down

0 comments on commit a3b5513

Please sign in to comment.