Skip to content

Commit

Permalink
Create non-parent directories
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Sep 10, 2024
1 parent 2dc703e commit 8cb7ea1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ fun moveFilesRecursively(sourceDir: File, destDir: File) {
}
}

if (!destFile.exists()) {
if (!destFile.mkdirs()) {
println("FAILED to create directory ${destFile.parentFile.path}")
return
}
}

if (!sourceFile.exists()) {
println("Source file ${sourceFile.path} does not exist!")
return
Expand Down

0 comments on commit 8cb7ea1

Please sign in to comment.