diff options
Diffstat (limited to 'src/vs/platform/files/common/inMemoryFilesystemProvider.ts')
-rw-r--r-- | src/vs/platform/files/common/inMemoryFilesystemProvider.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vs/platform/files/common/inMemoryFilesystemProvider.ts b/src/vs/platform/files/common/inMemoryFilesystemProvider.ts index f4d13e998ec..5ee8e5366b6 100644 --- a/src/vs/platform/files/common/inMemoryFilesystemProvider.ts +++ b/src/vs/platform/files/common/inMemoryFilesystemProvider.ts @@ -143,6 +143,10 @@ export class InMemoryFileSystemProvider extends Disposable implements IFileSyste } async mkdir(resource: URI): Promise<void> { + if (this._lookup(resource, true)) { + throw new FileSystemProviderError('file exists already', FileSystemProviderErrorCode.FileExists); + } + const basename = resources.basename(resource); const dirname = resources.dirname(resource); const parent = this._lookupAsDirectory(dirname, false); |