Skip to content

Commit

Permalink
Apply suggestions for review
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Jan 21, 2025
1 parent 1105843 commit 49dca8b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public void copy(Path source, Path target, CopyOption... options)
* "copying directories is not yet supported: %s", target); // TODO
*/
ImmutableSet<CopyOption> 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)) {
Expand Down

0 comments on commit 49dca8b

Please sign in to comment.