1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 10:10:46 +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:
Marc Bonnici 2018-01-08 14:01:05 +00:00 committed by setrofim
parent 3761b488a0
commit 54d6a6d39d

View File

@ -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)