You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
CopyToRemote: create parent directories as needed (#1161)
## Summary
- Use `MkdirAll` instead of `Mkdir` when creating the destination path
in `CopyToRemote`, so all necessary parent directories are created
automatically (similar to `mkdir -p`)
- Previously, copying to a path like `/a/b/c/file` would fail if `/a/b`
didn't exist
- This applies to all copy modes: file copies, directory copies,
directory content copies, and text asset copies
Fixes #650
## Test plan
- [x] Added unit tests for parent directory creation in all copy modes:
- `copy_file_creates_parent_dirs` - copies a file to a deeply nested
path
- `copy_dir_creates_parent_dirs` - copies a directory to a deeply nested
path
- `copy_dir_contents_creates_parent_dirs` - copies directory contents to
a deeply nested path
- `copy_text_content_creates_parent_dirs` - copies text content to a
deeply nested path
- [x] All existing tests continue to pass (17/17 pass)