We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f672cc8 + b60ee54 commit 1c92196Copy full SHA for 1c92196
src/utils/index.ts
@@ -100,6 +100,13 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
100
}
101
} else {
102
name = fileName;
103
+ // Need to strip leading / for custom Studio documents which should not be treated as files.
104
+ // e.g. For a custom Studio document Test.ZPM, the variable name would be /Test.ZPM which is
105
+ // not the document name. The document name is Test.ZPM so requests made to the Atelier APIs
106
+ // using the name with the leading / would fail to find the document.
107
+ if (name.charAt(0) === "/") {
108
+ name = name.substr(1);
109
+ }
110
111
if (!name) {
112
return null;
0 commit comments