koztv-blog-tools 1.2.2 → 1.2.3

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/dist/index.js CHANGED
@@ -731,8 +731,10 @@ async function processPost(post, options, exportDir) {
731
731
  const ext = path2.extname(sourcePath).toLowerCase() || ".jpg";
732
732
  const newName = `image${i + 1}${ext}`;
733
733
  const targetPath = path2.join(targetMediaDir, newName);
734
- if (fs2.existsSync(sourcePath) && !fs2.existsSync(targetPath)) {
735
- fs2.copyFileSync(sourcePath, targetPath);
734
+ if (fs2.existsSync(sourcePath)) {
735
+ if (!fs2.existsSync(targetPath)) {
736
+ fs2.copyFileSync(sourcePath, targetPath);
737
+ }
736
738
  mediaFiles.push(newName);
737
739
  }
738
740
  }
package/dist/index.mjs CHANGED
@@ -674,8 +674,10 @@ async function processPost(post, options, exportDir) {
674
674
  const ext = path2.extname(sourcePath).toLowerCase() || ".jpg";
675
675
  const newName = `image${i + 1}${ext}`;
676
676
  const targetPath = path2.join(targetMediaDir, newName);
677
- if (fs2.existsSync(sourcePath) && !fs2.existsSync(targetPath)) {
678
- fs2.copyFileSync(sourcePath, targetPath);
677
+ if (fs2.existsSync(sourcePath)) {
678
+ if (!fs2.existsSync(targetPath)) {
679
+ fs2.copyFileSync(sourcePath, targetPath);
680
+ }
679
681
  mediaFiles.push(newName);
680
682
  }
681
683
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koztv-blog-tools",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Shared utilities for Telegram-based blog sites",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",