-
Notifications
You must be signed in to change notification settings - Fork 8.2k
fix: Ensure proper path for file processing #11033
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
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis PR replaces manual string-based path splitting ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (6 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (39.21%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #11033 +/- ##
==========================================
- Coverage 33.11% 33.10% -0.01%
==========================================
Files 1389 1389
Lines 65685 65685
Branches 9720 9720
==========================================
- Hits 21750 21744 -6
- Misses 42821 42826 +5
- Partials 1114 1115 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
lucaseduoli
left a comment
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.
LGTM
This pull request refactors how filenames are extracted from file paths in the
src/backend/base/langflow/api/v2/files.pymodule. The changes improve code readability and reliability by replacing manual string splitting with thePathclass for all filename extraction operations.File path handling improvements:
file.path.split("/")[-1]withPath(file.path).nameto extract filenames in the following functions:upload_user_file,delete_files_batch,download_files_batch,download_file,delete_file, anddelete_all_files. [1] [2] [3] [4] [5] [6]Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.