ScilifelabDataCentre / dds_web

A cloud-based system for the delivery of data from SciLifeLab Facilities to their users (e.g. research group).
Other
7 stars 7 forks source link

Fixed index out of range when listing files from root #1543

Closed rv0lt closed 1 month ago

rv0lt commented 1 month ago

Read this before submitting the PR

  1. Always create a Draft PR first
  2. Go through sections 1-5 below, fill them in and check all the boxes
  3. Make sure that the branch is updated; if there's an "Update branch" button at the bottom of the PR, rebase or update branch.
  4. When all boxes are checked, information is filled in, and the branch is updated: mark as Ready For Review and tag reviewers (top right)
  5. Once there is a submitted review, implement the suggestions (if reasonable, otherwise discuss) and request an new review.

If there is a field which you are unsure about, enter the edit mode of this description or go to the PR template; There are invisible comments providing descriptions which may be of help.

1. Description / Summary

When listing files and the source is specified this way, it generates an out of range error:

dds ls -p project_1 -f /

This is due to the code striping the last trailing character to properly process folder names. The command above should, therefore be equal to

dds ls -p project1 -f . or dds ls -p project! -f ./

This PR solves this issues and patch this.

2. Jira task / GitHub issue

Link to the github issue or add the Jira task ID here.

3. Type of change

What type of change(s) does the PR contain?

Check the relevant boxes below. For an explanation of the different sections, enter edit mode of this PR description template.

4. Additional information

5. Actions / Scans

Check the boxes when the specified checks have passed.

For information on what the different checks do and how to fix it if they're failing, enter edit mode of this description or go to the PR template.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.46%. Comparing base (6474bde) to head (6d96c6d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1543 +/- ## ========================================== - Coverage 92.49% 92.46% -0.04% ========================================== Files 29 29 Lines 4850 4830 -20 ========================================== - Hits 4486 4466 -20 Misses 364 364 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.