Qi Xiao
ff0d1f9ca5
Fixup for #1394
...
- Do not ignore errors from os.ReadDir
- Call results from os.ReadDir "files" instead of "infos"
2021-08-30 09:02:06 +01:00
Kurtis Rader
383b083760
Replace remaining deprecated ioutil.ReadDir uses
...
Resolves #1350
2021-08-30 08:57:34 +01:00
Qi Xiao
d0be34c227
Run gofmt with Go 1.17.
...
This has created a lot of //go:build lines.
2021-08-23 00:19:49 +01:00
Qi Xiao
e9d328aa16
Make use of (*testing.T).Cleanup for test cleanups.
...
This allows turning the following pattern in tests:
value, cleanup := setupSomething()
defer cleanup()
into the following:
value := setupSomething(t)
2021-08-06 23:21:23 +01:00
Qi Xiao
196eea21d4
Change module import path to src.elv.sh
2021-01-27 01:30:25 +00:00
Qi Xiao
a1cde7b77b
pkg/fsutil: Fix claim_test.go for Windows.
2021-01-17 00:55:51 +00:00
Qi Xiao
f530a71afc
pkg/fsutil: Add more tests for ClaimFile.
...
The test for concurrent calls uncovered a bug where concurrent calls could
return the same file; fix this by adding a O_EXCL flag.
2021-01-17 00:11:38 +00:00
Kurtis Rader
d241243fdf
Ensure the daemon doesn't have fds open on the tty
...
The Elvish daemon should not inherit file descriptors open on the tty.
Make the daemon's stdin open on the null device and its stdout/stderr
open on a predictable file.
Fixes #1191
2021-01-16 23:18:38 +00:00
Kurtis Rader
a943dc764a
Improve navigation mode corner cases
...
There are some Navigation mode corner cases whose current behavior is
surprising. Such as inserting a space before the filename when the space
isn't wanted or redundant. Also, selecting an empty directory and pressing
Enter should insert nothing rather than an empty string.
Fixes #1169
2020-11-07 13:17:00 -05:00
Qi Xiao
bd1348e6c8
pkg/fsutil: Add correct build tag to search_unix_test.go.
2020-09-04 22:36:52 +01:00
Qi Xiao
b986d80a49
pkg/eval: Move EachExternal to the fsutil package.
2020-09-04 22:04:20 +01:00
Qi Xiao
11898f763a
pkg/util: Break into fsutil/ and logutil/.
2020-09-03 05:27:18 +01:00