Skip to content

Commit 50ca161

Browse files
committed
support for create files in csp folder with isfs
1 parent fff8824 commit 50ca161

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/providers/FileSystemPovider/FileSystemProvider.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
9292

9393
public writeFile(
9494
uri: vscode.Uri,
95-
content: Uint8Array,
95+
content: Buffer,
9696
options: {
9797
create: boolean;
9898
overwrite: boolean;
@@ -114,6 +114,16 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
114114
return;
115115
}
116116
if (options.create) {
117+
if (csp) {
118+
return api.putDoc(
119+
fileName,
120+
{
121+
content: [content.toString("base64")],
122+
enc: true,
123+
},
124+
false
125+
);
126+
}
117127
const fileExt = fileName
118128
.split(".")
119129
.pop()

syntaxes/objectscript-class.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
}
359359
},
360360
{
361-
"begin": "(?i)^(\\XData\\b)(\\s+)((?:SVG)?Style)",
361+
"begin": "(?i)^(\\XData\\b)(\\s+)((?:SVG|CSS3)?Style)",
362362
"beginCaptures": {
363363
"1": {
364364
"name": "keyword.objectscript_class"

0 commit comments

Comments
 (0)