Commit facf7646 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Ignore symlinks in 'buildFileList()' method.

parent fa03e04b
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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,