Skip to content

Commit

Permalink
Revert "Preserve attributes of published files (#4522)"
Browse files Browse the repository at this point in the history
This reverts commit f09def4.
  • Loading branch information
pditommaso committed Jan 9, 2025
1 parent f09def4 commit cdf5fe4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import java.nio.file.LinkOption
import java.nio.file.NoSuchFileException
import java.nio.file.Path
import java.nio.file.PathMatcher
import java.nio.file.StandardCopyOption
import java.time.temporal.ChronoUnit
import java.util.concurrent.ExecutorService

Expand Down Expand Up @@ -510,13 +509,13 @@ class PublishDir {
FilesEx.mklink(source, [hard:true], destination)
}
else if( mode == Mode.MOVE ) {
FileHelper.movePath(source, destination, StandardCopyOption.COPY_ATTRIBUTES)
FileHelper.movePath(source, destination)
}
else if( mode == Mode.COPY ) {
FileHelper.copyPath(source, destination, StandardCopyOption.COPY_ATTRIBUTES)
FileHelper.copyPath(source, destination)
}
else if( mode == Mode.COPY_NO_FOLLOW ) {
FileHelper.copyPath(source, destination, StandardCopyOption.COPY_ATTRIBUTES, LinkOption.NOFOLLOW_LINKS)
FileHelper.copyPath(source, destination, LinkOption.NOFOLLOW_LINKS)
}
else {
throw new IllegalArgumentException("Unknown file publish mode: ${mode}")
Expand Down

0 comments on commit cdf5fe4

Please sign in to comment.