-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix top directory in file browser #1393
base: dev
Are you sure you want to change the base?
Conversation
@confluence I started to refactor the code using std::filesystem to resolve a file path and check its type (directory or file), but it became more code maintenance than bug fix and would change many files (look for "exists" in the code!). For this issue, I only fixed the bug, and will refactor in another PR. |
I suppose I should also add a test for this bug fix. |
Added FileListTest for default top level folder "/", expect success=true, 0 files, >0 subdirectories. |
|
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.
Looks good. The issue is gone. No other regression from e2e.
Description
What is implemented or fixed? Mention the linked issue(s), if any.
Fixes [file browser] "back to starting directory" button does not work #1394
How does this PR solve the issue? Give a brief summary.
casacore::Path cannot resolve "/" or "/." to absolute path due to parsing error. Instead, use casacore::Path::expandedName() which is used for casacore::File::exists() and casacore::File::isReadable().
Are there any companion PRs (frontend, protobuf)?
No
Is there anything else that testers should know (e.g. exactly how to reproduce the issue)?
Open file browser and click the top directory of breadcrumbs, which is the root directory. A file list should appear instead of an error.
Checklist
no changelog update neededcorresponding fix added/new e2e test createdprotobuf updated to the latest dev commit/ no protobuf update neededprotobuf version bumped/ protobuf version not bumped