Skip to content

Commit

Permalink
extract tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 2, 2024
1 parent c3a21b6 commit efa2900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const contentDisposition = require('content-disposition')

const dirList = require('./lib/dirList')
const { generateHashes } = require('./lib/hash')
const hashesFilePath = path.join('.tmp', 'hashes.json')
let fileHashes

const asteriskRegex = /\*/gu
Expand Down Expand Up @@ -67,7 +68,6 @@ async function fastifyStatic (fastify, opts) {
throw new Error('"wildcard" has to be disabled to use "hash"')
}

const hashesFilePath = path.join('.tmp', 'hashes.json')
try {
const hashesContent = await readFile(hashesFilePath, 'utf8')
fileHashes = new Map(Object.entries(JSON.parse(hashesContent)))
Expand Down

0 comments on commit efa2900

Please sign in to comment.