fix: remove panic in IsFile() on file close error#94
fix: remove panic in IsFile() on file close error#94AR21SM wants to merge 1 commit intokrkn-chaos:mainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
@tsebastiani @paigerube14 gentle ping for review when you get a chance! 🙂 |
|
please update the fork and rebase on main |
Signed-off-by: AR21SM <mahajanashishar21sm@gmail.com>
4a0e9eb to
271ccc3
Compare
done |
User description
Description
Fixes #93
The IsFile() function in pkg/typing/types.go uses
panic()to handle file close errors. This can crash the application when running on network filesystems or container volumes where I/O errors may occur duringfile.Close().For read-only file handles, close errors can be safely ignored. This PR removes the panic and silently discards the close error.
Before:
After :
PR Type
Bug fix
Description
Remove panic on file close error in IsFile() function
Safely ignore close errors for read-only file handles
Prevent application crashes on network filesystems
Diagram Walkthrough
File Walkthrough
types.go
Remove panic on file close error handlingpkg/typing/types.go
volumes