Skip to content

Commit

Permalink
fixed zarr test
Browse files Browse the repository at this point in the history
  • Loading branch information
sllynn committed Nov 12, 2024
1 parent a479ab7 commit 02c8e42
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/scala/com/databricks/labs/mosaic/utils/PathUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,13 @@ object PathUtils {
for (path <- toCopy) {
val destination = Paths.get(copyToPath, path.getFileName.toString)
// noinspection SimplifyBooleanMatch
if (Files.isDirectory(path)) FileUtils.copyDirectory(path.toFile, destination.toFile)
else if (path.toFile != destination.toFile) {
FileUtils.copyFile(path.toFile, destination.toFile)
if (path != destination) {
if (Files.isDirectory(path)) {
FileUtils.copyDirectory(path.toFile, destination.toFile)
}
else {
FileUtils.copyFile(path.toFile, destination.toFile)
}
}
}
}
Expand Down

0 comments on commit 02c8e42

Please sign in to comment.