Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize path #1568

Open
maxulysse opened this issue Jun 18, 2024 · 1 comment
Open

Sanitize path #1568

maxulysse opened this issue Jun 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@maxulysse
Copy link
Member

Description of the bug

params.outdir + "/path/output/"

->

file(params.outdir + "/path/output/").toUriString()

Command used and terminal output

No response

Relevant files

No response

System information

No response

@maxulysse maxulysse added the bug Something isn't working label Jun 18, 2024
@adamrtalbot
Copy link
Contributor

For context, the bug is that sometimes the path is resolved to include a double slash. This breaks certain filesystems:

e.g.

params.outdir = '/output/`

params.outdir + /path/ = /output//path/

Using file operations will solve this: https://www.nextflow.io/docs/latest/script.html#opening-files

Options:
file(params.outdir).resolve("path")
file(params.outdir) / "path"
file("${params.outdir}/path") <- path object
file("${params.outdir}/path").toUriString() <- string object

@maxulysse maxulysse added this to the 3.5 milestone Jun 18, 2024
@FriederikeHanssen FriederikeHanssen self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants