From e5208405715c74784651abd295ce1214052dabe6 Mon Sep 17 00:00:00 2001 From: Liplum Date: Thu, 21 Dec 2023 17:48:52 +0800 Subject: [PATCH] lock file --- main/src/SharedCache.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/src/SharedCache.kt b/main/src/SharedCache.kt index b78b5ff..79194df 100644 --- a/main/src/SharedCache.kt +++ b/main/src/SharedCache.kt @@ -10,7 +10,7 @@ import kotlin.math.absoluteValue internal -const val infoX = "info.json" +const val lockFileEx = "lock.json" data class GihHubDownloadTrack( /** @@ -97,7 +97,7 @@ object SharedCache { newTimestamp: Long = System.currentTimeMillis(), logger: Logger? = null, ) { - val infoFi = File("$lockFile.$infoX") + val infoFi = File("$lockFile.$lockFileEx") if (infoFi.isDirectory) { infoFi.deleteRecursively() } @@ -115,7 +115,7 @@ object SharedCache { lockFile: File, outOfDate: Long = R.outOfDataDuration, ): Boolean { - val infoFi = File("$lockFile.$infoX") + val infoFi = File("$lockFile.$lockFileEx") if (!lockFile.exists()) { if (infoFi.exists()) infoFi.delete() return false