Skip to content

Commit

Permalink
Fix fs list command [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Sep 18, 2023
1 parent 0375281 commit 29ab2f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/nextflow/src/main/groovy/nextflow/cli/CmdFs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package nextflow.cli

import static nextflow.file.FileHelper.toCanonicalPath

import java.nio.charset.Charset
import java.nio.file.Files
import java.nio.file.Path
Expand Down Expand Up @@ -233,14 +235,14 @@ class CmdFs extends CmdBase implements UsageAware {
def splitter = FilePatternSplitter.glob().parse(source)
if( splitter.isPattern() ) {
final scheme = splitter.scheme
final folder = splitter.parent
final target = scheme ? "$scheme://$splitter.parent" : splitter.parent
final folder = toCanonicalPath(target)
final pattern = splitter.fileName
final fs = FileHelper.fileSystemForScheme(scheme)

def opts = [:]
opts.type = 'file'
opts.type = 'any'

FileHelper.visitFiles(opts, fs.getPath(folder), pattern, op)
FileHelper.visitFiles(opts, folder, pattern, op)
}
else {
def normalised = splitter.strip(source)
Expand Down

0 comments on commit 29ab2f2

Please sign in to comment.