Repository navigation
put -r: say where the folder goes, and name a missing parent folder - #189
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #185.
put -rcopies likecp -r: into a destination folder that already exists, the source folder goes inside it. That's unchanged here, but nothing said so, and re-uploading a library to the same path wrote a nested copy while the old files stayed where code imports them from.put --help, the CLI reference and the file-transfer guide now say where the folder goes, and the guide shows how to update a folder already on the board (put -r ./cast /).[Errno 2] /repro/cast/a.py, naming a file inside it. It now sayscan't create /repro/cast: the folder /repro isn't on the board (make it first: mpftp mkdir /repro), before writing anything.Reproduced on an ESP32-P4 over USB: the first put into a missing
/reprofailed naming/repro/cast/a.py, and a secondput -r new/cast /repro/castwrote/repro/cast/cast/a.py. After the change the first names/repro, andput -r new/cast /reproreplaced/repro/cast/a.py(read back as the new file).test_put.pyhas a test for the error that fails without the change.A way to update a folder in place with the same destination path (a trailing slash, or a flag) would change what
put -rdoes, so it isn't in this PR.