Bug 1434664 - Fix mozdevice's pull/push methods on Windows r?bc draft
authorWilliam Lachance <wlachance@mozilla.com>
Wed, 31 Jan 2018 13:08:30 -0500
changeset 750741 a6970f3833e00df43c06728524d41cd51c10dee9
parent 715271 ac93fdadf1022211eec62258ad22b42cb37a6d14
child 750742 82b9127c1a79429f6406ed4d22c036f6abab1981
push id97725
push userwlachance@mozilla.com
push dateFri, 02 Feb 2018 18:53:02 +0000
reviewersbc
bugs1434664
milestone59.0a1
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
testing/mozbase/mozdevice/mozdevice/adb.py
--- 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