imgconvert-cli
Advanced tools
+2
-2
| { | ||
| "name": "imgconvert-cli", | ||
| "version": "1.7.6", | ||
| "version": "1.7.7", | ||
| "description": "A CLI tool for compressing and converting images", | ||
| "main": "src/index.js", | ||
| "bin": { | ||
| "imgconvert": "./index.js" | ||
| "imgconvert": "index.js" | ||
| }, | ||
@@ -9,0 +9,0 @@ "engines": { |
@@ -460,3 +460,16 @@ /** | ||
| fs.renameSync(tempOutputFile, finalOutputFile); | ||
| // Try to rename (move) the temp file to the final destination | ||
| // If cross-device link error (EXDEV), use copy+unlink instead | ||
| try { | ||
| fs.renameSync(tempOutputFile, finalOutputFile); | ||
| } catch (renameErr) { | ||
| if (renameErr.code === 'EXDEV') { | ||
| // Cross-device link: source and dest are on different filesystems | ||
| // Use copy+unlink as fallback | ||
| fs.copyFileSync(tempOutputFile, finalOutputFile); | ||
| fs.unlinkSync(tempOutputFile); | ||
| } else { | ||
| throw renameErr; | ||
| } | ||
| } | ||
@@ -463,0 +476,0 @@ const { size: newSize } = fs.statSync(finalOutputFile); |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
124141
0.38%1734
0.76%10
11.11%