Bug 1434664 - Fix mozdevice's pull/push methods on Windows r?bc
We should use posixpath's normpath for calculating the remote
(i.e. device path) with these methods.
MozReview-Commit-ID: zwfsRvCxoe
--- a/testing/mozbase/mozdevice/mozdevice/adb.py
+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
@@ -1723,17 +1723,17 @@ class ADBDevice(ADBCommand):
may exceed this value. If it is not specified, the value
set in the ADBDevice constructor is used.
:type timeout: integer or None
:raises: * ADBTimeoutError
* ADBError
"""
# remove trailing /
local = os.path.normpath(local)
- remote = os.path.normpath(remote)
+ remote = posixpath.normpath(remote)
copy_required = False
if os.path.isdir(local):
copy_required = True
temp_parent = tempfile.mkdtemp()
remote_name = os.path.basename(remote)
new_local = os.path.join(temp_parent, remote_name)
dir_util.copy_tree(local, new_local)
local = new_local
@@ -1768,17 +1768,17 @@ class ADBDevice(ADBCommand):
may exceed this value. If it is not specified, the value
set in the ADBDevice constructor is used.
:type timeout: integer or None
:raises: * ADBTimeoutError
* ADBError
"""
# remove trailing /
local = os.path.normpath(local)
- remote = os.path.normpath(remote)
+ remote = posixpath.normpath(remote)
copy_required = False
original_local = local
if self._adb_version >= '1.0.36' and \
os.path.isdir(local) and self.is_dir(remote):
# See do_sync_pull in
# https://android.googlesource.com/platform/system/core/+/master/adb/file_sync_client.cpp
# Work around change in behavior in adb 1.0.36 where if
# the local destination directory exists, adb pull will