Skip to content

Commit dd48c4c

Browse files
committed
fix(@angular-devkit/schematics): ensure renamed files do not exist
1 parent 0a2a743 commit dd48c4c

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/core/src/virtual-fs/host

1 file changed

+2
-2
lines changed

packages/angular_devkit/core/src/virtual-fs/host/record.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ export class CordHost extends SimpleMemoryHost {
351351
exists(path: Path): Observable<boolean> {
352352
return this._exists(path)
353353
? of(true)
354-
: (this.willDelete(path) ? of(false) : this._back.exists(path));
354+
: ((this.willDelete(path) || this.willRename(path)) ? of(false) : this._back.exists(path));
355355
}
356356
isDirectory(path: Path): Observable<boolean> {
357357
return this._exists(path) ? super.isDirectory(path) : this._back.isDirectory(path);
358358
}
359359
isFile(path: Path): Observable<boolean> {
360360
return this._exists(path)
361361
? super.isFile(path)
362-
: (this.willDelete(path) ? of(false) : this._back.isFile(path));
362+
: ((this.willDelete(path) || this.willRename(path)) ? of(false) : this._back.isFile(path));
363363
}
364364

365365
stat(path: Path) {

0 commit comments

Comments
 (0)