Skip to content

Commit

Permalink
Fix Always emit publish event for symlinks on resume (#4790)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Mar 7, 2024
1 parent 17d0dce commit bb5c4f9
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -385,14 +385,16 @@ class PublishDir {
processFileImpl(source, destination)
}
catch( FileAlreadyExistsException e ) {
if( checkIsSameRealPath(source, destination) )
return
// don't copy source path if target is identical, but still emit the publish event
// see also https://github.com/nextflow-io/nf-prov/issues/22
final sameRealPath = checkIsSameRealPath(source, destination)

// make sure destination and source does not overlap
// see https://github.com/nextflow-io/nextflow/issues/2177
if( checkSourcePathConflicts(destination))
if( !sameRealPath && checkSourcePathConflicts(destination))
return

if( overwrite ) {
if( !sameRealPath && overwrite ) {
FileHelper.deletePath(destination)
processFileImpl(source, destination)
}
Expand Down

0 comments on commit bb5c4f9

Please sign in to comment.