From 851cbe9fdf3ec1c0ab8916580e7a110850aa7391 Mon Sep 17 00:00:00 2001 From: AndreyKoltsov1997 Date: Fri, 29 Nov 2024 17:12:06 +0100 Subject: [PATCH] [TCQA] Plugins generation: update extension related to directories creation --- tool/agent-upgrade-dist/src/main/kotlin/Files.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/agent-upgrade-dist/src/main/kotlin/Files.kt b/tool/agent-upgrade-dist/src/main/kotlin/Files.kt index db76bee9..759b6457 100644 --- a/tool/agent-upgrade-dist/src/main/kotlin/Files.kt +++ b/tool/agent-upgrade-dist/src/main/kotlin/Files.kt @@ -8,8 +8,8 @@ fun File.dir(): Sequence = 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() }