Skip to content
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

Simple file dialog: Save As does not right trim spaces from a filename #95760

Closed
jpagliaccio opened this issue Apr 21, 2020 · 6 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders simple-file-dialog Issues with simple file dialog verified Verification succeeded
Milestone

Comments

@jpagliaccio
Copy link

Issue Type: Bug

If you do a Save As, and add a space to the end of the filename by accident, there is no right trim of trailing spaces. You get files with a trailing space in the filename which is very confusing especially when using the new SSH extension to a Linux system.

VS Code version: Code 1.44.1 (a9f8623, 2020-04-11T01:48:12.622Z)
OS version: Windows_NT x64 10.0.16299
Remote OS version: Linux x64 3.10.0-1062.18.1.el7.x86_64

Extensions (6)
Extension Author (truncated) Version
remote-containers ms- 0.112.0
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-wsl ms- 0.44.2
vscode-remote-extensionpack ms- 0.20.0
mssql ms- 1.9.0

(1 theme extensions excluded)

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug simple-file-dialog Issues with simple file dialog labels Apr 22, 2020
@alexr00 alexr00 modified the milestone: April 2020 Apr 22, 2020
@alexr00 alexr00 removed the bug Issue identified by VS Code Team member as probable bug label Apr 22, 2020
@alexr00
Copy link
Member

alexr00 commented Apr 22, 2020

If you are running on a system where spaces in the filename are permitted (not Windows) then you should be allowed to have a space.

@alexr00 alexr00 added the *as-designed Described behavior is as designed label Apr 22, 2020
@jpagliaccio
Copy link
Author

jpagliaccio commented Apr 26, 2020 via email

@alexr00 alexr00 reopened this Apr 27, 2020
@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug and removed *as-designed Described behavior is as designed labels Apr 27, 2020
@alexr00 alexr00 added this to the May 2020 milestone Apr 27, 2020
alexr00 added a commit that referenced this issue May 13, 2020
@weinand
Copy link
Contributor

weinand commented Jun 4, 2020

While trying to verify this on macOS I found this strange behavior:
On "Save As" on a file (e.g. test.js) I added a space at the of "test.js" and saved.
A file "test.js mjs" showed up in the explorer.

2020-06-04_17-27-41 (1)

Trying the same on a file "test.txt" results in "test.txt .txt"

@weinand weinand reopened this Jun 4, 2020
@weinand weinand added the verification-found Issue verification failed label Jun 4, 2020
@alexr00 alexr00 changed the title Save As does not right trim spaces from a filename Simple file dialog: Save As does not right trim spaces from a filename Jun 5, 2020
@alexr00 alexr00 removed the verification-found Issue verification failed label Jun 5, 2020
@alexr00
Copy link
Member

alexr00 commented Jun 5, 2020

This change only impacts the simple file dialog. We let the system file dialog do whatever it's going to do.

@alexr00 alexr00 closed this as completed Jun 5, 2020
@weinand
Copy link
Contributor

weinand commented Jun 5, 2020

@alexr00 BTW, this problem does not occur in Stable.

@JacksonKearl JacksonKearl added the verified Verification succeeded label Jun 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders simple-file-dialog Issues with simple file dialog verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@weinand @jpagliaccio @JacksonKearl @alexr00 and others