Skip to content

Commit d31e90f

Browse files
Generation shouldn't fail if there is old (not actually locked) utbot… (#1350)
Generation shouldn't fail if there is old (not actually locked) utbot.lock file
1 parent 7e9c904 commit d31e90f

File tree

1 file changed

+1
-1
lines changed
  • utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util

1 file changed

+1
-1
lines changed

utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/LockFile.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object LockFile {
2222
if (currentLock != null) return false
2323
return try {
2424
Paths.get(utbotHomePath).toFile().mkdirs()
25-
currentLock = Paths.get(lockFilePath).outputStream(StandardOpenOption.CREATE_NEW, StandardOpenOption.DELETE_ON_CLOSE).also {
25+
currentLock = Paths.get(lockFilePath).outputStream(StandardOpenOption.CREATE, StandardOpenOption.DELETE_ON_CLOSE).also {
2626
it.write(DateFormat.getDateTimeInstance().format(System.currentTimeMillis()).toByteArray())
2727
}
2828
logger.debug("Locked")

0 commit comments

Comments
 (0)