@@ -277,7 +277,7 @@ def collectFilesAndDirs(obj, out):
277
277
278
278
279
279
def relocateOutputs (outputObj , # type: Union[Dict[Text, Any],List[Dict[Text, Any]]]
280
- outdir , # type: Text
280
+ destination_path , # type: Text
281
281
output_dirs , # type: Set[Text]
282
282
action , # type: Text
283
283
fs_access , # type: StdFsAccess
@@ -315,14 +315,14 @@ def moveIt(src, dst):
315
315
316
316
outfiles = [] # type: List[Dict[Text, Any]]
317
317
collectFilesAndDirs (outputObj , outfiles )
318
- pm = PathMapper (outfiles , "" , outdir , separateDirs = False )
318
+ pm = PathMapper (outfiles , "" , destination_path , separateDirs = False )
319
319
stageFiles (pm , stageFunc = moveIt , symLink = False )
320
320
321
- def _check_adjust (f ):
322
- f ["location" ] = file_uri (pm .mapper (f ["location" ])[1 ])
323
- if "contents" in f :
324
- del f ["contents" ]
325
- return f
321
+ def _check_adjust (file ):
322
+ file ["location" ] = file_uri (pm .mapper (file ["location" ])[1 ])
323
+ if "contents" in file :
324
+ del file ["contents" ]
325
+ return file
326
326
327
327
visit_class (outputObj , ("File" , "Directory" ), _check_adjust )
328
328
if compute_checksum :
@@ -333,11 +333,11 @@ def _check_adjust(f):
333
333
# make an internal relative symlink.
334
334
if action == "move" :
335
335
relinked = {} # type: Dict[Text, Text]
336
- for root , dirs , files in os .walk (outdir ):
336
+ for root , dirs , files in os .walk (destination_path ):
337
337
for f in dirs + files :
338
338
path = os .path .join (root , f )
339
- rp = os .path .realpath (path )
340
- if path != rp :
339
+ if os .path .islink (path ):
340
+ rp = os . path . realpath ( path )
341
341
if rp in relinked :
342
342
if onWindows ():
343
343
if os .path .isfile (path ):
@@ -457,7 +457,6 @@ def eval_resource(builder, resource_req): # type: (Builder, Text) -> Any
457
457
return builder .do_eval (resource_req )
458
458
return resource_req
459
459
460
-
461
460
class Process (six .with_metaclass (abc .ABCMeta , HasReqsHints )):
462
461
def __init__ (self ,
463
462
toolpath_object , # type: Dict[Text, Any]
@@ -573,8 +572,8 @@ def __init__(self,
573
572
if dockerReq and dockerReq .get ("dockerOutputDirectory" ) and not is_req :
574
573
_logger .warning (SourceLine (
575
574
item = dockerReq , raise_type = Text ).makeError (
576
- "When 'dockerOutputDirectory' is declared, DockerRequirement "
577
- "should go in the 'requirements' section, not 'hints'." "" ))
575
+ "When 'dockerOutputDirectory' is declared, DockerRequirement "
576
+ "should go in the 'requirements' section, not 'hints'." "" ))
578
577
579
578
if dockerReq and dockerReq .get ("dockerOutputDirectory" ) == "/var/spool/cwl" :
580
579
if is_req :
0 commit comments