Skip to content

put fails with filenames containing glob patterns #812

Closed
@legrostdg

Description

@legrostdg

Command line:

$ touch ~/'test1[foo].txt'
$ touch ~/'test2.txt'

Python shell:

>>> from fabric.api import put
>>> put('~/test1\[foo\].txt', '/tmp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/fabric/network.py", line 465, in host_prompting_wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/fabric/operations.py", line 369, in put
    raise ValueError(err)
ValueError: '/home/myuser/test1\[foo\].txt' is not a valid local path or glob.
>>> put('~/test2.txt', '/tmp')
[example.com] put: /home/myuser/test2.txt -> /tmp/test2.txt
['/tmp/test2.txt']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions