Skip to content

Commit

Permalink
Not removing directory to clean.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unthrottled committed Sep 4, 2022
1 parent a5d2f97 commit f41962c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "io.unthrottled.doki.build.jvm"
version = "88.0.1"
version = "88.0.2"

java {
withSourcesJar()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ object PathTools {
return path
}

fun cleanDirectory(themeDirectory: Path) {
if (Files.notExists(themeDirectory)) {
createDirectories(themeDirectory)
fun cleanDirectory(directoryToClean: Path) {
if (Files.notExists(directoryToClean)) {
createDirectories(directoryToClean)
} else {
Files.walk(themeDirectory)
Files.walk(directoryToClean)
.filter(Files::exists)
.filter { pathToRemove -> pathToRemove != directoryToClean }
.sorted(Comparator.reverseOrder())
.forEach(Files::delete)
}
Expand Down

0 comments on commit f41962c

Please sign in to comment.