Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: copying dangling or nested symlink results in error #2422

Closed
SuperSandro2000 opened this issue Jun 17, 2021 · 2 comments · Fixed by #2426
Closed

cp: copying dangling or nested symlink results in error #2422

SuperSandro2000 opened this issue Jun 17, 2021 · 2 comments · Fixed by #2426

Comments

@SuperSandro2000
Copy link
Contributor

I have the following directory structure where the file two points to a none existing file.

 tree -h a/
 a
└──  c
   └──  d
      └──  2 ⇒ ../../d/c/1

When copying with uutils-cp I get

$ result/bin/cp -r -- a 2
cp: No such file or directory (os error 2)

Using gnu-cp works just fine and recreates the dangling symlink.

@SuperSandro2000
Copy link
Contributor Author

SuperSandro2000 commented Jun 17, 2021

Also experience the same error when copying this directory from the nix store

result/bin/cp -r -- /nix/store/ayddsfvxqa8khxg5f0n5ysbml69m5cvf-source source
cp: '/nix/store/ayddsfvxqa8khxg5f0n5ysbml69m5cvf-source/misc/minetest-icon.ico' -> 'source/misc/minetest-icon.ico': No such file or directory (os error 2)

source.tar.gz

├──  doc
│  ├──  builtin_entities.txt
│  ├──  client_lua_api.txt
│  ├──  Doxyfile.in
│  ├──  fst_api.txt
│  ├──  lgpl-2.1.txt
│  ├──  lua_api.txt
│  ├──  main_page.dox
│  ├──  menu_lua_api.txt
│  ├──  minetest.6
│  ├──  minetestserver.6
│  ├──  mkdocs
│  │  ├──  build.sh
│  │  ├──  docs
│  │  │  ├──  css
│  │  │  │  ├──  code_styles.css
│  │  │  │  └──  extra.css
│  │  │  └──  img
│  │  │     └──  favicon.ico ⇒ ../../../../misc/minetest-icon.ico

@SuperSandro2000 SuperSandro2000 changed the title cp: copying a dangling symlink results in error cp: copying dangling symlink results in error Jun 17, 2021
@SuperSandro2000 SuperSandro2000 changed the title cp: copying dangling symlink results in error cp: copying dangling or nested symlink results in error Jun 17, 2021
@miDeb
Copy link
Contributor

miDeb commented Jun 17, 2021

This should also be fixed by #2426 (I checked the example #2422 (comment))

@tertsdiepraam tertsdiepraam linked a pull request Jun 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants