mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 19:01:47 +03:00
fix: stabilize media paths and logs
This commit is contained in:
@@ -857,8 +857,11 @@ async function stageSandboxMedia(params: {
|
||||
}) {
|
||||
const { ctx, sessionCtx, cfg, sessionKey, workspaceDir } = params;
|
||||
const hasPathsArray = Array.isArray(ctx.MediaPaths) && ctx.MediaPaths.length > 0;
|
||||
const rawPaths = hasPathsArray
|
||||
const pathsFromArray = Array.isArray(ctx.MediaPaths)
|
||||
? ctx.MediaPaths
|
||||
: undefined;
|
||||
const rawPaths = pathsFromArray && pathsFromArray.length > 0
|
||||
? pathsFromArray
|
||||
: ctx.MediaPath?.trim()
|
||||
? [ctx.MediaPath.trim()]
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user