Skip to content

Commit

Permalink
Fixed Staging input files in a subfolder changes their names when the…
Browse files Browse the repository at this point in the history
…y are symlinks #292
  • Loading branch information
pditommaso committed Mar 6, 2017
1 parent d4fe0a0 commit e6fc342
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/groovy/nextflow/processor/TaskProcessor.groovy
Expand Up @@ -1613,7 +1613,7 @@ class TaskProcessor {
if( name.endsWith('/*') ) {
final p = name.lastIndexOf('/')
final dir = name.substring(0,p)
return files.collect { it.withName("${dir}/${it.storePath.name}") }
return files.collect { it.withName("${dir}/${it.stageName}") }
}

// no wildcards in the file name
Expand Down
7 changes: 7 additions & 0 deletions src/test/groovy/nextflow/processor/TaskProcessorTest.groovy
Expand Up @@ -261,6 +261,13 @@ class TaskProcessorTest extends Specification {
list1 *. stageName == ['dir/file.fa']
list2 *. stageName == ['dir/file_1.fa', 'dir/file_2.fa', 'dir/file_3.fa']

when:
list1 = processor.expandWildcards('dir/*', [FileHolder.get('file.fa')])
list2 = processor.expandWildcards('dir/*', [FileHolder.get('titi.fa'), FileHolder.get('file.fq', 'toto.fa')])
then:
list1 *. stageName == ['dir/file.fa']
list2 *. stageName == ['dir/titi.fa', 'dir/toto.fa']

}


Expand Down

0 comments on commit e6fc342

Please sign in to comment.