diff --git a/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/LockFile.kt b/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/LockFile.kt index e9ac6a3aa1..3f5fc0a9e4 100644 --- a/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/LockFile.kt +++ b/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/LockFile.kt @@ -22,7 +22,7 @@ object LockFile { if (currentLock != null) return false return try { Paths.get(utbotHomePath).toFile().mkdirs() - currentLock = Paths.get(lockFilePath).outputStream(StandardOpenOption.CREATE_NEW, StandardOpenOption.DELETE_ON_CLOSE).also { + currentLock = Paths.get(lockFilePath).outputStream(StandardOpenOption.CREATE, StandardOpenOption.DELETE_ON_CLOSE).also { it.write(DateFormat.getDateTimeInstance().format(System.currentTimeMillis()).toByteArray()) } logger.debug("Locked")