@openclaw-china/dingtalk 2026.3.7 → 2026.3.8-1

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
@@ -5291,7 +5291,20 @@ async function finalizeInboundMediaFile(options) {
5291
5291
  await fsPromises.mkdir(datedDir, { recursive: true });
5292
5292
  await fsPromises.rename(current, target);
5293
5293
  return target;
5294
- } catch {
5294
+ } catch (error) {
5295
+ const code = error?.code ?? "";
5296
+ if (code === "EXDEV") {
5297
+ try {
5298
+ await fsPromises.copyFile(current, target);
5299
+ try {
5300
+ await fsPromises.unlink(current);
5301
+ } catch {
5302
+ }
5303
+ return target;
5304
+ } catch {
5305
+ return current;
5306
+ }
5307
+ }
5295
5308
  return current;
5296
5309
  }
5297
5310
  }