Closed
Conversation
Only apply os.Chmod to directories newly created by os.MkdirAll. Previously, chmod was called unconditionally, which broke saving files into pre-existing directories not owned by the process (e.g., /tmp) with "operation not permitted" error. Refs gin-gonic#4622 Agent-Logs-Url: https://github.com/odlev/gin/sessions/2d0f57ad-a46e-45f6-a2f2-b6d4c352f22e Co-authored-by: odlev <65655276+odlev@users.noreply.github.com>
Agent-Logs-Url: https://github.com/odlev/gin/sessions/2d0f57ad-a46e-45f6-a2f2-b6d4c352f22e Co-authored-by: odlev <65655276+odlev@users.noreply.github.com>
…nics Agent-Logs-Url: https://github.com/odlev/gin/sessions/a5300762-e9da-4790-8669-fd5200269ead Co-authored-by: odlev <65655276+odlev@users.noreply.github.com>
Agent-Logs-Url: https://github.com/odlev/gin/sessions/a5300762-e9da-4790-8669-fd5200269ead Co-authored-by: odlev <65655276+odlev@users.noreply.github.com>
fix: safe type assertions in Hijack and CloseNotify to prevent panics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
masterbranch.docs/doc.md.Description
Context.Error()now unwraps errors created byerrors.Join()— eachinner error gets its own entry in
c.Errorsinstead of being stored as asingle opaque multi-error.
Before:
After:
The unwrap is recursive, so nested joins work too.
If a joined error contains a
*gin.Error, its Type and Meta are preserved.Empty
Unwrap()slices fall through to the normal path.Added 3 tests: basic join, nested join, join with typed
*gin.Error.Fixes #4237 - #4237