@openclaw-china/wecom-app 2026.3.7 → 2026.3.8-2

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
@@ -6,7 +6,7 @@ import ot from 'readline';
6
6
  import 'tty';
7
7
  import { existsSync } from 'fs';
8
8
  import 'util';
9
- import { readFile, mkdir, writeFile, rename, unlink, readdir, stat } from 'fs/promises';
9
+ import { readFile, mkdir, writeFile, rename, copyFile, unlink, readdir, stat } from 'fs/promises';
10
10
  import { spawn } from 'child_process';
11
11
 
12
12
  var __create = Object.create;
@@ -6423,7 +6423,19 @@ async function finalizeInboundMedia(account, filePath) {
6423
6423
  try {
6424
6424
  await rename(p, dest);
6425
6425
  return dest;
6426
- } catch {
6426
+ } catch (error) {
6427
+ const code = error?.code ?? "";
6428
+ if (code === "EXDEV") {
6429
+ try {
6430
+ await copyFile(p, dest);
6431
+ try {
6432
+ await unlink(p);
6433
+ } catch {
6434
+ }
6435
+ return dest;
6436
+ } catch {
6437
+ }
6438
+ }
6427
6439
  try {
6428
6440
  await unlink(p);
6429
6441
  } catch {