Skip to content

cp --preserve=links -R -H doesn't keep the inodes #5031

@sylvestre

Description

@sylvestre
rm -rf a b c
touch a
ln -s a b
mkdir c
./target/debug/coreutils cp --preserve=links -R -H a b c
a_inode=$(ls -i c/a|sed 's,c/.*,,')
b_inode=$(ls -i c/b|sed 's,c/.*,,')
echo "$a_inode" = "$b_inode"

a_inode & b_inode should be the same
they aren't with our implementation

GNU test: tests/cp/link-preserve.sh

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