node-mac-recorder 2.21.19 → 2.21.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -449,8 +449,8 @@ class MacRecorder extends EventEmitter {
|
|
|
449
449
|
const originalBaseName = path.basename(outputPath, path.extname(outputPath));
|
|
450
450
|
const extension = path.extname(outputPath);
|
|
451
451
|
|
|
452
|
-
// Remove any existing timestamp from filename (pattern: -1234567890)
|
|
453
|
-
const cleanBaseName = originalBaseName.replace(
|
|
452
|
+
// Remove any existing timestamp from filename (pattern: -1234567890 or _1234567890)
|
|
453
|
+
const cleanBaseName = originalBaseName.replace(/[-_]\d{13}$/, '');
|
|
454
454
|
|
|
455
455
|
// Reconstruct path with sessionTimestamp
|
|
456
456
|
outputPath = path.join(outputDir, `${cleanBaseName}-${sessionTimestamp}${extension}`);
|