-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
feat: update file utilities for windows processing #1483
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
LGTM 👍 |
This comment was generated by github-actions[bot]! JS SDK Coverage Report📊 Coverage report for JS SDK can be found at the following URL: 📁 Test report folder can be found at the following URL: |
return { | ||
name: path.split("/").pop() || `${actionName}_${Date.now()}`, | ||
name: pathModule.basename(path) || `${actionName}_${Date.now()}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment explaining the fallback filename pattern. Something like:
// Fallback to timestamp-based name if basename extraction fails
name: pathModule.basename(path) || `${actionName}_${Date.now()}`,
This would help future maintainers understand the purpose of the fallback.
Code Review SummaryOverall Assessment: ✅ Good to merge with minor suggestionsThe changes improve the codebase by:
Suggestions:
Code Quality: 8/10
The changes are well-thought-out and improve the code's reliability. The suggestions are minor and don't impact functionality. |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
Fix Windows path handling in file utils
This PR addresses an issue where filename extraction fails on Windows systems due to backslash () path separators.
Changes:
Add path normalization before basename extraction
Handle URLs and file paths differently for proper cross-platform support
Maintain backward compatibility with existing functionality
This fix ensures consistent filename extraction across all operating systems, particularly benefiting Windows users.