Skip to content

ensureLink does not ensure the destination is hard linked to the source #870

Closed
@pyrocat101

Description

@pyrocat101
  • Operating System: macOS 10.15.7
  • Node.js version: v12.20.1
  • fs-extra version: 5.0.0 (checked source code in master and the issue is still there)

ensureLink shortcuts if the destination path exists, without verifying if the destination file's inode is the same as the source file. This is misleading because it is not really an "ensurance".

Relevant code:

if (destinationExists) return callback(null)

Activity

RyanZim

RyanZim commented on Feb 25, 2021

@RyanZim
Collaborator

I think this should be fixed by #826; would appreciate review/testing there.

added this to the 10.0.0 milestone on Apr 1, 2021
added a commit that references this issue on Apr 1, 2021
fa64be8
added a commit that references this issue on Apr 2, 2021
4523526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

      Participants

      @pyrocat101@RyanZim

      Issue actions

        `ensureLink` does not ensure the destination is hard linked to the source · Issue #870 · jprichardson/node-fs-extra