Correctly resolve image paths
This commit is contained in:
parent
65a67da803
commit
395c669ec0
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ const saveImages = ({ buffer, filename }) => {
|
|||
filename,
|
||||
extname
|
||||
)}.${size}${extname}`
|
||||
const outputFile = `${options.outputDir}/${newFilename}`
|
||||
const outputFile = path.resolve(options.outputDir, newFilename)
|
||||
const fileExists = await doesFileExist({ filename: outputFile })
|
||||
if (fileExists) return console.log(`↩️ ${outputFile} exists, skipping`)
|
||||
return saveImage({ buffer, size, outputFile })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue