-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add a button to file open dialog to convert backslashes to forward slashes #6932
Comments
Jason in #5626 you mentioned:
To my understanding backslashes can be used in file names on Linux and OS, but not in windows, does it make sense to auto-change it if both a Windows operating system and backslashes are detected? It seems we could get rid of the button in that case. |
backslashes (
I don't think we can do that reliably in a way that is intuitive for the user. We have three possibly different computers here:
Are you suggesting that if all of these three computers are windows, and we detect a backslash, we can automatically convert it to a forward slash? I think that's a bit too magical and unpredictable. |
I was operating under the assumption that the Kernel and Server would be on the same machine. I suppose that's not always the case. |
Often the kernel and server are on the same machine these days. That assumption will probably hold less and less moving forward as we have cloud deployments. However, there still is the question of which of the browser or server OS to pay attention to. |
Just for clarity: The "open file dialog" will be communicating to a contents manager (are drives supported?), which might be somewhere else than the server (the kernel should not be taken into account, except as a possible source of a path). The paths should follow the spec here: https://jupyter-notebook.readthedocs.io/en/stable/extending/contents.html#apipaths |
For context, this entire discussion started because someone wanted to easily paste in paths from a kernel error message into the open dialog box. That seems reasonable, and gave rise to backslash paths when the kernel was running on windows. |
As noted in #5051 and #5626, windows users would sometimes like to type in paths that have backslashes in them. For example, a windows user might get such a path from an error message in the kernel, or from some other file browser in the operating system. It can be annoying for a windows user to convert a backslash-delimited path to the forward-slash delimited path JupyterLab (and the Jupyter server) expects.
One idea that came up in #5626 is a button in the file open dialog that simply replaces backslashes with forward slashes in the textbox. That way a user can easily normalize their path right in that dialog. Perhaps the button is only active if we detect a backslash in the path.
The text was updated successfully, but these errors were encountered: