Bug 747599 - SUT agent: follow symlinks in pushDir. r=jmaher

This commit is contained in:
Geoff Brown 2012-04-26 19:21:38 -04:00
parent 16b4ea9e09
commit 8b2c4bbdb4
2 changed files with 3 additions and 3 deletions

View File

@ -219,7 +219,7 @@ class DeviceManagerADB(DeviceManager):
self.useZip = False
self.pushDir(localDir, remoteDir)
else:
for root, dirs, files in os.walk(localDir, followlinks='true'):
for root, dirs, files in os.walk(localDir, followlinks=True):
relRoot = os.path.relpath(root, localDir)
for file in files:
localFile = os.path.join(root, file)

View File

@ -407,7 +407,7 @@ class DeviceManagerSUT(DeviceManager):
# failure: None
def pushDir(self, localDir, remoteDir):
if (self.debug >= 2): print "pushing directory: %s to %s" % (localDir, remoteDir)
for root, dirs, files in os.walk(localDir):
for root, dirs, files in os.walk(localDir, followlinks=True):
parts = root.split(localDir)
for file in files:
remoteRoot = remoteDir + '/' + parts[1]
@ -428,7 +428,7 @@ class DeviceManagerSUT(DeviceManager):
# success: True
# failure: False
def dirExists(self, dirname):
match = ".*" + dirname + "$"
match = ".*" + dirname.replace('^', '\^') + "$"
dirre = re.compile(match)
try:
data = self.runCmds(['cd ' + dirname, 'cwd'])