mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 23:20:44 +00:00
11 lines
439 B
TypeScript
11 lines
439 B
TypeScript
import fs from "node:fs/promises";
|
|
import path from "node:path";
|
|
import { lowercasePreservingWhitespace } from "openclaw/plugin-sdk/text-runtime";
|
|
|
|
export async function resolveArtifactKey(absolutePath: string): Promise<string> {
|
|
const canonicalPath = await fs.realpath(absolutePath).catch(() => path.resolve(absolutePath));
|
|
return process.platform === "win32"
|
|
? lowercasePreservingWhitespace(canonicalPath)
|
|
: canonicalPath;
|
|
}
|