gistpad
gistpad copied to clipboard
Fix_128
This PR fixes Issue# Fix for issue #128: Unable to open Gist file with backslash in the filename
Description of the PR:
The uri.path value passed from openFistFile (file.ts:164) is json escaped but needs to be HTML encoded; since it is not, vscode fails to find the file and throws the exception described in the issue.
Additional context:
Here are the two uri objects as an example, note the different path value
broken:
{
scheme: "gist",
authority: "7beed6d4b22a859f2fabc028c2d6dbe5",
path: "/History\\-258baa23\\entries.json",
query: "",
fragment: "",
_formatted: null,
_fsPath: null,
}
working:
{
scheme: "gist",
authority: "7beed6d4b22a859f2fabc028c2d6dbe5",
path: "/History%5C-258baa23%5Centries.json",
query: "",
fragment: "",
_formatted: null,
_fsPath: null,
}
@lostintangent I decided to not update the path when it is first added to the Tree because I did not want to inadvertently break other areas that may need it with the json encoding. If you think it is safe to use the HTML encoding instead I can make that change