-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
tools/mpremote: Support trailing slash on dest for non-recursive copy. #16164
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
tools/mpremote: Support trailing slash on dest for non-recursive copy. #16164
Conversation
|
Note: this is related to #2466 and #2929: filesystems on bare-metal ports don't like trailing slashes in their filenames, even if it refers to a directory. So that's why trailing slashes need to be stripped before passing them down to the target board (also doing the strip in |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #16164 +/- ##
=======================================
Coverage 98.57% 98.57%
=======================================
Files 164 164
Lines 21345 21345
=======================================
Hits 21041 21041
Misses 304 304 ☔ View full report in Codecov by Sentry. |
|
Code size report: |
|
This would also go in a v1.24.1 patch release. |
projectgus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
mpremote error messages now go to stderr, so make sure stdout is flushed before printing them. Also update the test runner to capture error messages. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
This fixes a regression in db59e55: prior to that commit `mpremote` supported trailing slashes on the destination of a normal (non-recursive) copy. Add back support for that, with the semantics that a trailing slash requires the destination to be an existing directory. Also add a test for this. Signed-off-by: Damien George <damien@micropython.org>
0ad35d1 to
4fd5b72
Compare
|
For some reason the windows mingw dev CI is failing, but that's also happening on master so it's nothing to do with this PR. That needs separate investigation. |
Summary
This fixes a regression in db59e55: prior to that commit
mpremotesupported trailing slashes on the destination of a normal (non-recursive) copy.Add back support for that, with the semantics that a trailing slash requires the destination to be an existing directory.
Testing
A test has been added to the
mpremotetests (also a test for force copy, in a separate commit). As part of getting the test working, needed to flush stdout before printing error messages to stderr.The
mpremotetests were then run on a PYBD_SF2. They passed.