Skip to content

Glow chokes on broken symlinks #836

@bobbykjack

Description

@bobbykjack

Describe the bug

Two problems with a broken symlink, when viewing an ancestor directory in the TUI:

  • An entry for a markdown document shows in the list, with no name, just a time/date
  • If the entry is selected with Enter, the "Loading document" spinner continues indefinitely

Setup
Please complete the following information along with version numbers, if applicable.

  • OS: macOS
  • Shell: zsh
  • Terminal Emulator: iTerm2
  • Terminal Multiplexer: n/a
  • Locale: en_GB.UTF-8 (presumed)

To Reproduce
Steps to reproduce the behavior:

  1. Create a broken link with a .md extension (e.g. ln -s this-file-does-not-exist file.md)
  2. Run glow in the same directory
  3. Observe weird 'empty' entry in the document list
  4. Press Enter on empty document
  5. Observe program hanging while trying to load document

Expected behavior
Glow should either mark the document as 'bad' and ignore interactions with it, or ignore it and leave it out of the document list altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions