mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 00:47:15 +08:00
add isExtractDoneFlagFilePath to mark chrome extension extract done
This commit is contained in:
@@ -47,7 +47,13 @@ export async function ensureEditThisCookie () {
|
|||||||
if (geekgeekrunEditVersion < APP_GEEKGEEKRUN_EDIT_VERSION) {
|
if (geekgeekrunEditVersion < APP_GEEKGEEKRUN_EDIT_VERSION) {
|
||||||
isNeedExtractEditThisCookie = true
|
isNeedExtractEditThisCookie = true
|
||||||
}
|
}
|
||||||
|
const isExtractDoneFlagFilePath = path.join(editThisCookieExtensionPath, 'EXTRACT_DONE')
|
||||||
|
if (
|
||||||
|
!isNeedExtractEditThisCookie &&
|
||||||
|
!fs.existsSync(isExtractDoneFlagFilePath)
|
||||||
|
) {
|
||||||
|
isNeedExtractEditThisCookie = true
|
||||||
|
}
|
||||||
if (isNeedExtractEditThisCookie) {
|
if (isNeedExtractEditThisCookie) {
|
||||||
if (
|
if (
|
||||||
fs.existsSync(
|
fs.existsSync(
|
||||||
@@ -68,5 +74,9 @@ export async function ensureEditThisCookie () {
|
|||||||
dir: extensionDir
|
dir: extensionDir
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
await fs.promises.writeFile(
|
||||||
|
isExtractDoneFlagFilePath,
|
||||||
|
''
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user