diff --git a/docs/reference/config.md b/docs/reference/config.md index 3466e0d5af..cc5045345a 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -1654,6 +1654,7 @@ The `workflow` scope provides workflow execution options. `workflow.output.copyAttributes` : :::{versionadded} 25.01.0-edge ::: +: *Currently only supported for local and shared filesystems.* : Copy file attributes (such as the last modified timestamp) to the published file (default: `false`). `workflow.output.enabled` diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy index efd9c90dbe..e20825c74d 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy @@ -501,7 +501,7 @@ class PublishDir { log.trace "publishing file: $source -[$mode]-> $destination" final options = new ArrayList<>(2) - final copyAttributes = session.config.navigate('workflow.output.copyAttributes') as Boolean + final copyAttributes = session.config.navigate('workflow.output.copyAttributes', false) if( copyAttributes ) options.add(StandardCopyOption.COPY_ATTRIBUTES) diff --git a/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java b/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java index d5810b1c81..c7c4f74164 100644 --- a/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java +++ b/plugins/nf-amazon/src/main/nextflow/cloud/aws/nio/S3FileSystemProvider.java @@ -535,7 +535,7 @@ public void copy(Path source, Path target, CopyOption... options) * "copying directories is not yet supported: %s", target); // TODO */ ImmutableSet actualOptions = ImmutableSet.copyOf(options); - verifySupportedOptions(EnumSet.of(StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING), + verifySupportedOptions(EnumSet.of(StandardCopyOption.REPLACE_EXISTING), actualOptions); if (!actualOptions.contains(StandardCopyOption.REPLACE_EXISTING)) {