Skip to content

CurrentFile.SaveAs() doesn't work for untitled files #1303

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

Closed
rjmholt opened this issue Apr 27, 2018 · 0 comments
Closed

CurrentFile.SaveAs() doesn't work for untitled files #1303

rjmholt opened this issue Apr 27, 2018 · 0 comments
Assignees
Labels
Area-psEditor Issue-Enhancement A feature request (enhancement).

Comments

@rjmholt
Copy link
Contributor

rjmholt commented Apr 27, 2018

If an untitled file is opened and the language mode changed to PowerShell, trying to SaveAs() will silently do nothing because the first thing we do is check for the file path. Untitled URIs fail this test, so just do nothing.

We should instead recognise untitled URIs and save them relative to the workspace root (or if an absolute path is given, just save it there).

Thanks to @ brwilkinson to pointing this issue out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-psEditor Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

1 participant