Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: RemoveAll blocks indefinitely on large directories without permissions #29921
What version of Go are you using (
Here is a patch of 1.12beta2 that solves this problem. Hopefully this will more clearly illustrate the error conditions.
I'm not proposing this as a solution (it may create other cases I'm not familiar with), and there is still a similar logic error for the noat RemoveAll implementation.
…ReqSize Previously we injected an error, and the injection points were (empirically) not realistic on some platforms. Instead, we now make the directory read-only, which (on most platforms) suffices to prevent the removal of its files. Fixes #35117 Updates #29921 Change-Id: Ica4e2818566f8c14df3eed7c3b8de5c0abeb6963 Reviewed-on: https://go-review.googlesource.com/c/go/+/203502 Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org> Reviewed-by: Brad Fitzpatrick <email@example.com>