mirror of
https://github.com/openharmony/test_xdevice.git
synced 2026-07-21 06:05:27 -04:00
!162 修复PushKit反斜杠导致资源没有推送成功2
Merge pull request !162 from liguangjie/cherry-pick-1661864731
This commit is contained in:
@@ -257,7 +257,10 @@ class PushKit(ITestKit):
|
||||
self.pushed_file.append(os.path.join(dst, file))
|
||||
else:
|
||||
if device.is_directory(dst):
|
||||
dst = os.path.normpath(os.path.join(dst, os.path.basename(real_src_path)))
|
||||
dst = os.path.join(dst, os.path.basename(real_src_path))
|
||||
if dst.find("\\") > -1:
|
||||
dst_paths = dst.split("\\")
|
||||
dst = "/".join(dst_paths)
|
||||
device.push_file("{}".format(real_src_path),
|
||||
"{}".format(dst))
|
||||
LOG.debug("Push file finished from {} to {}".format(src, dst))
|
||||
|
||||
Reference in New Issue
Block a user