Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream repo spf13/afero@master #18

Open
wants to merge 149 commits into
base: master
Choose a base branch
from

Conversation

backstroke-bot
Copy link

Hello!

The upstream repository spf13/afero@master has some new changes that aren't in this fork. So, here they are, ready to be merged! 🎉

If this pull request can be merged without conflict, you can publish your software with these new changes. Otherwise, fix any merge conflicts by clicking the Resolve Conflicts button.


If you like Backstroke, consider donating to help us pay for infrastructure here. Backstroke is a completely open source project that's free to use, but we survive on sponsorships and donations. Thanks for your support! Help out Backstroke.


Created by Backstroke (I'm a bot!)

rwaweber and others added 30 commits February 8, 2018 23:49
Before this commit, `CopyOnWriteFs` would return `syscall.EEXIST` in `Mkdir` and `MkdirAll` when a directory already exists.

The main problem with this is that `os.IsExist` returns `false` for that error on Windows.

These methods now return `os.ErrExist`, which is in line with how the other file systems behave.

Fixes #189
It will now return io.EOF at the end of the directory view.

Fixes #194
Update Readdir to match behavior of stdlib os package.

Fixes #197
New users coming to the project could incorrectly assume that the project is pre-1.0 release and that it hasn't had a release in years if they assumed that the release notes in the README were up-to-date. I say this because I assumed that on my first read.
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
Remove stale release notes from README
sftpfs: Fix test with latest API of the sftp package
Add Support for WildCard in  TempFile Name Prefix
Build and test CI improvements
typerat and others added 30 commits March 10, 2022 08:24
As explained in
#291 (comment), now that
`afero` supports `io/fs.FS`, it requires `go` >= `1.15.10`.

Rather than pinning to `1.15` and occasionally confusing users who are
on < `1.15.10`, I thought simplest to jump straight to `1.16`.

Especially given `1.18` was just released, the upstream `go` team no
longer even supports `1.16`.

The change to `go.sum` was the result of running `go mod tidy`.
Update `go.mod` to reflect that `afero` requires `go` >= `1.15.10`
And also enable the CI build for Windows.
And implement `fs.ReadDirFile` for `BasePathFile`.

There are other `File` implementations that could also benefit from the above, but
this is a start.

The primary motivation behind this is to allow `fs.WalkDir` use the native
implementation whenever possible, as that new function was added in Go 1.16 with
speed as its main selling point.

This commit also adds a benchmark for `fs.WalkDir` that, when compared to the main branch:

```bash
name        old time/op    new time/op    delta
WalkDir-10     369µs ± 1%     196µs ± 3%  -46.89%  (p=0.029 n=4+4)

name        old alloc/op   new alloc/op   delta
WalkDir-10    85.3kB ± 0%    40.2kB ± 0%  -52.87%  (p=0.029 n=4+4)

name        old allocs/op  new allocs/op  delta
WalkDir-10       826 ± 0%       584 ± 0%  -29.30%  (p=0.029 n=4+4)
```

Fixes #365
We recently added a check for fs.ReadDirFile in IOFS.ReadDir, but forgot to apply a sort to the
result as defined in the spec.

This fixes that and adds a test case for it.
* The backing map is protected by a RWMutex
* This commit double checks for the existence of the directory inside the write lock to avoid potential data races when multiple goroutines tries to create
the same directory.

Fixes #361
Fixes #298
  - x/crypto - CVE-2020-9283, improper signature verification
  - x/crypto - CVE-2020-29652, nil pointer dereference
  - x/text - out of bounds read in <= v0.3.6
Added flags to const_bsds.go and const_win_unix.go to allow for building on IBM z/OS
* go get $(go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -m all)
* Update go version in go.mod to 1.19.
* go mod tidy
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.