Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Rename file, then create a new file with the same as the renamed file fails. #491

@sebawita

Description

@sebawita

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x] schematics

Versions

    "@angular-devkit/core": "^0.4.5",
    "@angular-devkit/schematics": "^0.4.5",
    "@schematics/angular": "^0.4.5",

Repro steps

Run a schematic with a file called test.txt

tree.rename('test.txt', 'other.txt');
tree.create('test.txt', 'content');

This will fail saying error! test.txt already exists.

Also the same happens, when I use apply url, that generates a previously renamed file.

tree.rename('test.txt', 'other.txt');
apply(url('./_files'), ...)

The log given by the failure

error! filename already exists.

Desired functionality

It should be possible to create a file that was previously deleted or renamed.

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions