Skip to content

The timing issue of connection.workspace.onDidRenameFiles and the fs.stat(path) method in Node.js #1623

Open
@mzhongl524

Description

@mzhongl524

Scenario:

When we use fs.stat(oldUri) in the specific implementation of onDidRenameFiles to determine the file before the modification, sometimes it throws an exception directly, and sometimes it passes, so we can execute the stats.isFile() method, and this situation causes our function to be very unstable.

Expected:

The correct result should be that the file before the modification no longer exists, so it should be an exception to be thrown to facilitate our subsequent business logic processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    info-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions