mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 704618 - Allow directory as a destination argument to SUT pushFile(); r=jmaher
This commit is contained in:
parent
b6cdc0ee29
commit
204a097bd9
@ -266,6 +266,10 @@ class DeviceManagerSUT(DeviceManager):
|
||||
destname = destname.replace('\\', '/')
|
||||
|
||||
if (self.debug >= 3): print "in push file with: " + localname + ", and: " + destname
|
||||
if (self.dirExists(destname)):
|
||||
if (not destname.endswith('/')):
|
||||
destname = destname + '/'
|
||||
destname = destname + os.path.basename(localname)
|
||||
if (self.validateFile(destname, localname) == True):
|
||||
if (self.debug >= 3): print "files are validated"
|
||||
return True
|
||||
@ -352,7 +356,10 @@ class DeviceManagerSUT(DeviceManager):
|
||||
parts = root.split(localDir)
|
||||
for file in files:
|
||||
remoteRoot = remoteDir + '/' + parts[1]
|
||||
remoteName = remoteRoot + '/' + file
|
||||
if (remoteRoot.endswith('/')):
|
||||
remoteName = remoteRoot + file
|
||||
else:
|
||||
remoteName = remoteRoot + '/' + file
|
||||
if (parts[1] == ""): remoteRoot = remoteDir
|
||||
if (self.pushFile(os.path.join(root, file), remoteName) == False):
|
||||
# retry once
|
||||
|
Loading…
Reference in New Issue
Block a user