mpremote romfs deploy: Directory handling is arguably inconsistent with cp -r #17192
Labels
enhancement
Feature requests, new feature implementations
tools
Relates to tools/ directory in source, or other tooling
Port, board and/or hardware
Board independent. Tested on RP2040
MicroPython version
MicroPython v1.25.0-dirty on 2025-04-19; Raspberry Pi Pico with RP2040
Built with romfs
Reproduction
Issue
where
foo
is a directory on the PC containing subdirectoriesExpected behaviour
The command
$ mpremote cp -r foo :
copies the directory
foo
with contents and subdirectories to the host. This is consistent withObserved behaviour
By contrast
copies the contents of
foo
as per$ cp -r foo/* bar
A typical project might consist of a Python package
foo
where the executablefoo
is contained in a directory holding documentation and other resources. The requirement is to copyfoo
and its contents. Currently this requires a workround involving a temporary directory and a symlink.Additional Information
Options are either to change this behaviour or provide means of deploying either the directory + contents or contents alone.
Code of Conduct
Yes, I agree
The text was updated successfully, but these errors were encountered: