Comparing version 1.1.1 to 1.1.2
const fs = require('fs'); | ||
const path = require('path'); | ||
const temp = require('temp-dir'); | ||
const shortid = require('shortid'); | ||
const ExifTool = require('exiftool-vendored').ExifTool; | ||
shortid.characters('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@'); | ||
const master = { | ||
@@ -85,5 +88,9 @@ exiftool: null, | ||
const target = path.parse(list.shift()); | ||
const source = target.dir + '/' + target.name + target.ext; | ||
const preview = options.destination + '/' + target.name + '.jpg'; | ||
const source = `${target.dir}/${target.name}${target.ext}`; | ||
let preview = `${options.destination}/${target.name}.jpg`; | ||
if (source === preview) { | ||
preview = `${options.destination}/${target.name}${Array.from(shortid.generate()).slice(0, 9).join('')}.jpg`; | ||
} | ||
await outcome(remove(preview)); | ||
@@ -90,0 +97,0 @@ |
{ | ||
"name": "extractd", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Extract previews from DSLR and mirrorless cameras' RAW files", | ||
@@ -49,4 +49,5 @@ "main": "extractd.js", | ||
"dependencies": { | ||
"exiftool-vendored": "^8.12.0", | ||
"temp-dir": "^2.0.0" | ||
"temp-dir": "^2.0.0", | ||
"shortid": "^2.2.14", | ||
"exiftool-vendored": "^8.13.0" | ||
}, | ||
@@ -53,0 +54,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28573
470
3
+ Addedshortid@^2.2.14
+ Addednanoid@2.1.11(transitive)
+ Addedshortid@2.2.16(transitive)
Updatedexiftool-vendored@^8.13.0