Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
LazyFolderChooserinterpolated the selected folder path straight into the/api/filesystemquery string:A folder whose name contains
&(also#,+) produced a request like?path=H:/Audio & Books&level=1. The&terminates thepathparameter, so the server only seespath=H:/Audio— a non-existent relative path — and answers400 Invalid "path" query string. The UI then shows the "Failed to load data" toast and the subfolders never load.Encoding the value with
encodeURIComponentkeeps the path in a single parameter. The server already receives a decoded value, becauseFileSystemController.getPathsreadsreq.query.pathfrom Express' query parser, so no server-side change is needed.This matches how the rest of the client builds query strings (e.g.
search.vue,GlobalSearch.vue,Match.vue).Where to review
client/components/modals/libraries/LazyFolderChooser.vue— single line, infetchDirs.Testing
GET /api/filesystem?path=H:/Audio & Books&level=1→400.encodeURIComponent, the same server returns the subfolders for a folder namedAudio & Books.client/tree is covered by the repo's eslint ignore patterns, so no lint config changes are needed).Related