mirror of
https://github.com/ARM-software/devlib.git
synced 2025-03-04 09:17:51 +00:00
AndroidTarget: Ensure path is correctly quoted when listing directories
Previously the path for listing a directory on the device was not quoted causing it to fail on paths containing spaces. Now ensure the string is quoted and any quotes contained in the string as escaped.
This commit is contained in:
parent
63bf68b49d
commit
329df6f42e
@ -1099,7 +1099,7 @@ class AndroidTarget(Target):
|
||||
def list_directory(self, path, as_root=False):
|
||||
if self.ls_command == '':
|
||||
self.__setup_list_directory()
|
||||
contents = self.execute('{} {}'.format(self.ls_command, path), as_root=as_root)
|
||||
contents = self.execute('{} "{}"'.format(self.ls_command, escape_double_quotes(path)), as_root=as_root)
|
||||
return [x.strip() for x in contents.split('\n') if x.strip()]
|
||||
|
||||
def install(self, filepath, timeout=None, with_name=None): # pylint: disable=W0221
|
||||
|
Loading…
x
Reference in New Issue
Block a user