-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Trim starting and trailing spaces while creating/uploading/renaming files and folders in the webUI #39310
Conversation
8e06400
to
d9912e7
Compare
65f45ca
to
3b38bd7
Compare
3b38bd7
to
5e7b19d
Compare
5e7b19d
to
cc15a32
Compare
cc15a32
to
22e99b3
Compare
Kudos, SonarCloud Quality Gate passed! |
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.
This works for me. I tried edge-cases like:
- start with folders and sub-folders that have leading/trailing space in the name
- try to upload files or folders into the root, or into any folder or sub-folder - they get trimmed of leading/trailing space
- rename existing files/folders that have leading/trailing space, the space is trimmed off
- try to rename an existing file folder to add leading/trailing space, the space is trimmed off
- drag-and-drop to upload stuff - leading/trailing space is trimmed, including from any files/folders in the whole tree that is uploaded
@phil-davis nice, thx! I know there is a |
It will be a bit odd if there is already a file or folder named like Other things that I have tried bring up the conflict dialog and ask what to do, and happily create names like Because any stripping of spaces gets applied from the web UI to the server, those will been seen as new changes and synced to other clients, which seems good and should work. |
@phil-davis THX
Quite correct, but this should not be handled via UI IHMO, if we need it, we should write a migration that takes care of the files on storage |
IMO we don't need to bother having an automatic for any existing files with leading/trailing spaces. It might be useful to have a command somewhere that scans user storage for files with leading/trailing spaces and trims them. An admin can choose to do that if they like, which will cleanup this all-at-once. That can be a separte PR, if someone wants it. |
Description
Enhancement: Trim spaces while creating, uploading or renaming entities in webUI
With this change starting or trailing spaces will be removed while:
This also solves problems when the sync client can't sync files and folders
with trailing spaces based on the underlying file system.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: