Skip to content

Commit 8583d21

Browse files
committed
Update FileSystemProvider.ts
1 parent 299e049 commit 8583d21

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
400400
}
401401

402402
public createDirectory(uri: vscode.Uri): void | Thenable<void> {
403-
if (uri.path.includes(".vscode/")) {
404-
throw vscode.FileSystemError.NoPermissions("Cannot create a subdirectory of the /.vscode directory");
405-
}
403+
uri = redirectDotvscodeRoot(uri);
406404
const basename = path.posix.basename(uri.path);
407405
const dirname = uri.with({ path: path.posix.dirname(uri.path) });
408406
return this._lookupAsDirectory(dirname).then((parent) => {
@@ -696,9 +694,6 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
696694
if (vscode.workspace.getWorkspaceFolder(oldUri) != vscode.workspace.getWorkspaceFolder(newUri)) {
697695
throw vscode.FileSystemError.NoPermissions("Cannot rename a file across workspace folders");
698696
}
699-
if (oldUri.path.includes(".vscode/") || newUri.path.includes(".vscode/")) {
700-
throw vscode.FileSystemError.NoPermissions("Cannot rename a file in the /.vscode directory");
701-
}
702697
// Check if the destination exists
703698
let newFileStat: vscode.FileStat;
704699
try {

0 commit comments

Comments
 (0)