fix: handle empty argument for select (#2429)
* fix: handle empty argument for `select` * Update `CHANGELOG.md`
This commit is contained in:
1 parent
23ea7abd51
commit
402c7dd306
2 files changed
+4
-2
No files matched your search
@@ -35,6 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- A bug where the `loading...` message was not displayed for volatile previews after the first time is now fixed (#2410).
|
||||
- The `cmd-transpose` command now advances the cursor correctly after swapping characters (#2413).
|
||||
- Symbolic links are no longer followed when changing directories (#2423).
|
||||
- Using the `select` command with a blank string as the argument now properly raises an error instead of changing to the parent directory (#2429).
|
||||
|
||||
## [r41](https://github.com/gokcehan/lf/releases/tag/r41)
|
||||
|
||||
|
||||
@@ -1516,13 +1516,14 @@ func (e *callExpr) eval(app *app, _ []string) {
|
||||
return
|
||||
}
|
||||
|
||||
path, err := filepath.Abs(replaceTilde(e.args[0]))
|
||||
path := replaceTilde(e.args[0])
|
||||
lstat, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
app.ui.echoerrf("select: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
lstat, err := os.Lstat(path)
|
||||
path, err = filepath.Abs(replaceTilde(e.args[0]))
|
||||
if err != nil {
|
||||
app.ui.echoerrf("select: %s", err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user