1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

Target: Fixes __setup_list_directory issue on production devices.

As per issue #102, not all devices have permission to list the root directory
causing the ls command to be incorrectly determined. This commit changes the
directory to be checked to the working directory to ensure sufficient
permissions.
This commit is contained in:
Marc Bonnici 2017-03-29 16:43:22 +01:00
parent 119c259e73
commit 0655237217

View File

@ -894,7 +894,7 @@ class AndroidTarget(Target):
# so we try the new version, and if it fails we use the old version.
self.ls_command = 'ls -1'
try:
self.execute('ls -1 /', as_root=False)
self.execute('ls -1 {}'.format(self.working_directory), as_root=False)
except TargetError:
self.ls_command = 'ls'