Skip to content

"mpremote -rv :/" can remove files from host #17147

@Josverl

Description

@Josverl

Port, board and/or hardware

any

MicroPython version

mpremote v1.25.0

Reproduction

  • use mpremote mount .
  • Ctrl-C to terminate connection
  • run mpremote rm -rv :

Minimal repro: ⚠️ destructive ⚠️
mpremote mount . + rm -rv :

Expected behaviour

-rm -r :/ not to affect the local filesystem

Observed behaviour

apparently the mount was retained - and therefore the /remote , hosts filesystem, started be removed

rm :
removed directory: './.venv/Lib/site-packages/Deprecated-1.2.18.dist-info'
removed directory: './.venv/Lib/site-packages/adodbapi/examples'
removed directory: './.venv/Lib/site-packages/adodbapi/test'
removed directory: './.venv/Lib/site-packages/adodbapi'
removed directory: './.venv/Lib/site-packages/annotated_types-0.7.0.dist-info/licenses'
removed directory: './.venv/Lib/site-packages/annotated_types-0.7.0.dist-info'
removed directory: './.venv/Lib/site-packages/annotated_types/__pycache__'
removed directory: './.venv/Lib/site-packages/annotated_types'
removed directory: './.venv/Lib/site-packages/ansicon-1.89.0.dist-info'
removed directory: './.venv/Lib/site-packages/ansicon'
removed directory: './.venv/Lib/site-packages/anyio-4.9.0.dist-info'
removed directory: './.venv/Lib/site-packages/anyio/_backends'
removed directory: './.venv/Lib/site-packages/anyio/_core'
removed directory: './.venv/Lib/site-packages/anyio/abc'
removed directory: './.venv/Lib/site-packages/anyio/streams'
removed directory: './.venv/Lib/site-packages/anyio'

Additional Information

I think \remote should be special cased in mpremote rm -r to guard against this behavior

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy