mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Use to_bytes on filenames in filesystem calls.
This commit is contained in:
@@ -621,7 +621,7 @@ class Connection(ConnectionBase):
|
||||
super(Connection, self).put_file(in_path, out_path)
|
||||
|
||||
display.vvv(u"PUT {0} TO {1}".format(in_path, out_path), host=self.host)
|
||||
if not os.path.exists(in_path):
|
||||
if not os.path.exists(to_bytes(in_path, errors='strict')):
|
||||
raise AnsibleFileNotFound("file or module does not exist: {0}".format(to_str(in_path)))
|
||||
|
||||
# scp and sftp require square brackets for IPv6 addresses, but
|
||||
|
||||
Reference in New Issue
Block a user