-
Notifications
You must be signed in to change notification settings - Fork 53
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
NXDRIVE-2925: Ignore zero-byte files #5372
Conversation
Reviewer's Guide by SourceryThis pull request implements a change to ignore zero-byte files when processing additional local paths in the folders dialog. The modification affects both directory and file handling, ensuring that files with no content are not added to the paths dictionary. Sequence diagram for processing additional local pathssequenceDiagram
participant User
participant FoldersDialog
participant FileSystem
User->>FoldersDialog: Initiate path processing
FoldersDialog->>FileSystem: Check if path is directory
alt Path is a directory
FileSystem-->>FoldersDialog: Return list of files
loop For each file in directory
FoldersDialog->>FileSystem: Get file size
alt File size is zero
FoldersDialog-->>FoldersDialog: Ignore file
else File size is greater than zero
FoldersDialog-->>FoldersDialog: Add file to paths
end
end
else Path is a file
FoldersDialog->>FileSystem: Get file size
alt File size is zero
FoldersDialog-->>FoldersDialog: Ignore file
else File size is greater than zero
FoldersDialog-->>FoldersDialog: Add file to paths
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @gitofanindya - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a comment explaining why zero-byte files are being ignored. This will help future maintainers understand the rationale behind this decision.
- The logic for checking and ignoring zero-byte files is duplicated for both directory and file cases. Consider extracting this into a separate function to improve code maintainability and reduce duplication.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5372 +/- ##
==========================================
+ Coverage 49.24% 52.08% +2.84%
==========================================
Files 94 96 +2
Lines 15699 16094 +395
==========================================
+ Hits 7731 8383 +652
+ Misses 7968 7711 -257
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
👍
Summary by Sourcery
Bug Fixes: