mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: Allow pulling of folders as root
Adds '-r' flag to copy command to allow for copying of folders with their contents to temporary location on the device before pulling.
This commit is contained in:
parent
3761b488a0
commit
54d6a6d39d
@ -292,7 +292,7 @@ class Target(object):
|
||||
else:
|
||||
device_tempfile = self.path.join(self._file_transfer_cache, source.lstrip(self.path.sep))
|
||||
self.execute("mkdir -p '{}'".format(self.path.dirname(device_tempfile)))
|
||||
self.execute("cp '{}' '{}'".format(source, device_tempfile), as_root=True)
|
||||
self.execute("cp -r '{}' '{}'".format(source, device_tempfile), as_root=True)
|
||||
self.execute("chmod 0644 '{}'".format(device_tempfile), as_root=True)
|
||||
self.conn.pull(device_tempfile, dest, timeout=timeout)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user