diff --git a/transfer_service/retrieve_executor.py b/transfer_service/retrieve_executor.py index b00b1cf5d2c6825ea2572ddd7220b6b82db8c9ce..e322ce143f45e79d54273dcfb7b0c6caf7973220 100644 --- a/transfer_service/retrieve_executor.py +++ b/transfer_service/retrieve_executor.py @@ -129,13 +129,13 @@ class RetrieveExecutor(TaskExecutor): srcPath = nodeInfo["fullPath"] username = nodeInfo["username"] md5calc = Checksum() - if os.path.isdir(srcPath): + if os.path.isdir(srcPath) and not os.path.islink(srcPath): for root, dirs, files in os.walk(srcPath, topdown = False): dirSize = os.stat(root).st_size self.totalSize += dirSize for f in files: fullPath = os.path.join(root, f) - if md5calc.fileIsValid(fullPath): + if md5calc.fileIsValid(fullPath) and not os.path.islink(fullPath): fileSize = os.stat(fullPath).st_size fileInfo = { "baseSrcPath": baseSrcPath, @@ -147,7 +147,7 @@ class RetrieveExecutor(TaskExecutor): self.totalSize += fileSize self.fileList.append(fileInfo.copy()) else: - if md5calc.fileIsValid(srcPath): + if md5calc.fileIsValid(srcPath) and not os.path.islink(srcPath): fileSize = nodeInfo["contentLength"] fileInfo = { "baseSrcPath": baseSrcPath,