diff --git a/CHANGELOG.md b/CHANGELOG.md index 739d9d0..852306a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ Initial release of nf-core/datasync, created with the [nf-core](https://nf-co.re ### `Fixed` +- [[#73](https://github.com/nf-core/datasync/pull/73)] - Create tmp `files_to_copy.tx` avoiding error with write permissions in work directory ([@delfiterradas](https://github.com/delfiterradas), review by [@atrigila](https://github.com/atrigila) and [@antoniasaracco](https://github.com/antoniasaracco)). + ### `Dependencies` ### `Deprecated` diff --git a/workflows/datasync.nf b/workflows/datasync.nf index 7f64a97..a601e0d 100644 --- a/workflows/datasync.nf +++ b/workflows/datasync.nf @@ -106,7 +106,10 @@ workflow DATASYNC { .collect { it.readLines() } .inject { a, b -> a.intersect(b) } - def copy_files = file("${workDir}/${meta.id}_files_to_copy.txt") + def copy_files = java.nio.file.Files.createTempFile( + "${meta.id}_files_to_copy_", + ".txt" + ) copy_files.text = common.join('\n') + '\n' tuple(meta, copy_files)