Skip to content

cp -dR --no-preserve=links d c should have different inodes #5308

@sylvestre

Description

@sylvestre
rm -rf a b c d; mkdir d; (cd d; touch a; ln a b)
./target/debug/coreutils cp -dR --no-preserve=links d c

a_inode=$(ls -i c/a|sed 's,c/.*,,')
b_inode=$(ls -i c/b|sed 's,c/.*,,')
echo "$a_inode" = "$b_inode"

We should get different inodes

See #5031 for a similar issue

On my system, why GNU:
36311653 = 36341951
with our impl:
36311653 = 36311653

Tested by
GNU test: tests/cp/link-preserve.sh
https://github.com/coreutils/coreutils/blob/master/tests/cp/link-preserve.sh#L63-L68

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions