Skip to content

Fix crash on empty directories, fix directory listing logic, fix in ReadMe#117

Merged
mistakenelf merged 3 commits intomistakenelf:mainfrom
lazysegtree:lazysegtree
May 30, 2025
Merged

Fix crash on empty directories, fix directory listing logic, fix in ReadMe#117
mistakenelf merged 3 commits intomistakenelf:mainfrom
lazysegtree:lazysegtree

Conversation

@lazysegtree
Copy link
Contributor

@lazysegtree lazysegtree commented May 9, 2025

  • Prevent crash on pressing right key on empty directories
  • Fixes empty directory listing in case of the current directory had invalid symlinks.
  • See comments of Issue Crash while trying to navigate $HOME #115 for more info.

Fixes


Before
image
image

After
image

@lazysegtree
Copy link
Contributor Author

@mistakenelf Please try to review this fix when you are available

@lazysegtree lazysegtree changed the title Fix crash and directory listing logic. Fix crash on empty directories and fix directory listing logic. May 9, 2025
@lazysegtree lazysegtree changed the title Fix crash on empty directories and fix directory listing logic. Fix crash on empty directories, fix directory listing logic, fix in ReadMe May 9, 2025
- `fm update` will update fm to the latest version
- `fm --start-dir=/some/start/dir` will start fm in the specified directory
- `fm --selection-path=/tmp/tmpfile` will write the selected items path to the selection path when pressing <kbd>E</kbd> and exit fm
- `fm --start-dir=/some/dir` start fm at a specific directory
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mistakenelf This is duplicate. Just take a look at line 94

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@lazysegtree
Copy link
Contributor Author

@mistakenelf

image

There is some issue with linter settings. (golangci-lint 1.64.8)

@lazysegtree
Copy link
Contributor Author

Works after removing the linter

➜  ~/Workspace/kuknitin/fm git:(lazysegtree) [10:46:18] golangci-lint run --show-stats --max-issues-per-linter 10
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
ERRO [linters_context] exportloopref: This linter is fully inactivated: it will not produce any reports.
0 issues.
➜  ~/Workspace/kuknitin/fm git:(lazysegtree) [10:46:24] golangci-lint run --show-stats --max-issues-per-linter 10
0 issues.
➜  ~/Workspace/kuknitin/fm git:(lazysegtree) ✗ [10:46:36]

@lazysegtree
Copy link
Contributor Author

@mistakenelf Anything else I need to do it to get the fix merged ? Do you want additional unit tests, or some other test results ?

@mistakenelf
Copy link
Owner

Looks good, appreciate it

@mistakenelf mistakenelf merged commit 3eb63ee into mistakenelf:main May 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants