1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Eliminate TOCTOU problem in creating bbTmp.

This commit is contained in:
Sam Rose 2023-11-03 14:29:54 +00:00
parent 2ffb4b96cb
commit a27a9dc2af
No known key found for this signature in database

View file

@ -18,8 +18,12 @@ export const ObjectStoreBuckets = {
}
const bbTmp = join(tmpdir(), ".budibase")
if (!fs.existsSync(bbTmp)) {
try {
fs.mkdirSync(bbTmp)
} catch (e: any) {
if (e.code !== "EEXIST") {
throw e
}
}
export function budibaseTempDir() {