Loading transfer_service/retrieve_executor.py +13 −4 Original line number Diff line number Diff line Loading @@ -270,10 +270,19 @@ class RetrieveExecutor(TaskExecutor): osRelParentPath += "/" destDirPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath os.makedirs(destDirPath, exist_ok = True) if self.storageType == "cold": sp = subprocess.run(["rsync", "-av", "--no-links", srcPath, destDirPath], capture_output = True) if(sp.returncode or sp.stderr): self.logger.error(f"FATAL: error during the copy process, returnCode = {sp.returncode}, stderr: {sp.stderr}") return False else: destPath = destDirPath + os.path.basename(srcPath) try: if not os.path.islink(srcPath): os.symlink(srcPath, destPath) except Exception: self.logger.error(f"FATAL: error while creating symlink for target '{srcPath}'") return False # Remove files from file list at the end of the copy for fileInfo in blockFileList: Loading Loading
transfer_service/retrieve_executor.py +13 −4 Original line number Diff line number Diff line Loading @@ -270,10 +270,19 @@ class RetrieveExecutor(TaskExecutor): osRelParentPath += "/" destDirPath = self.storageRetrievePath.replace("{username}", username) + osRelParentPath os.makedirs(destDirPath, exist_ok = True) if self.storageType == "cold": sp = subprocess.run(["rsync", "-av", "--no-links", srcPath, destDirPath], capture_output = True) if(sp.returncode or sp.stderr): self.logger.error(f"FATAL: error during the copy process, returnCode = {sp.returncode}, stderr: {sp.stderr}") return False else: destPath = destDirPath + os.path.basename(srcPath) try: if not os.path.islink(srcPath): os.symlink(srcPath, destPath) except Exception: self.logger.error(f"FATAL: error while creating symlink for target '{srcPath}'") return False # Remove files from file list at the end of the copy for fileInfo in blockFileList: Loading