Skip to content

Commit

Permalink
[TCQA] Plugins generation: update extension related to directories cr…
Browse files Browse the repository at this point in the history
…eation
  • Loading branch information
AndreyKoltsov1997 committed Nov 29, 2024
1 parent 8b7b39e commit 851cbe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool/agent-upgrade-dist/src/main/kotlin/Files.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fun File.dir(): Sequence<File> = this.listFiles()?.asSequence() ?: emptySequence

fun File.ensureDirExists(description: String = "", createIfNotExists: Boolean = false): File {
if (this.exists()) {
if (this.isDirectory) {
throw Exception("\"$this\" - is not a directory.");
if (!this.isDirectory) {
throw Exception("\"$this\" - is not a directory.")
}
return Paths.get(path).toRealPath().toFile()
}
Expand Down

0 comments on commit 851cbe9

Please sign in to comment.