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 -r fails to create directories #18

Open
jaraco opened this issue Oct 17, 2024 · 0 comments
Open

cp -r fails to create directories #18

jaraco opened this issue Oct 17, 2024 · 0 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Oct 17, 2024

Attempting to copy a tree of files using cp -r fails when the first file of a subdirectory doesn't exist in the target:

 🐚 cp -r out out2
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\coombsjason\.local\bin\cp.exe\__main__.py", line 7, in <module>
  File "C:\Users\coombsjason\pipx\venvs\cmdix\Lib\site-packages\cmdix\__init__.py", line 127, in run
    return run_subcommand(commandname, argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\coombsjason\pipx\venvs\cmdix\Lib\site-packages\cmdix\__init__.py", line 165, in run_subcommand
    args.func(args)
  File "C:\Users\coombsjason\pipx\venvs\cmdix\Lib\site-packages\cmdix\command\cp.py", line 58, in func
    args.handle(_copy, args, dest, src)
  File "C:\Users\coombsjason\pipx\venvs\cmdix\Lib\site-packages\cmdix\command\cp.py", line 66, in handle_recursive
    walk(_copy, args, dest, src)
  File "C:\Users\coombsjason\pipx\venvs\cmdix\Lib\site-packages\cmdix\command\cp.py", line 104, in walk
    _copy(srcfile, dstfile)
  File "C:\Python312\Lib\shutil.py", line 435, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Python312\Lib\shutil.py", line 262, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '\\build\\Microsoft.NETFramework.ReferenceAssemblies.net45.targets'
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

No branches or pull requests

1 participant