Skip to content

fix: cross-platform path mismatch in capture handlers#55

Merged
akiojin merged 3 commits into
developfrom
bugfix/issue-54
Mar 2, 2026
Merged

fix: cross-platform path mismatch in capture handlers#55
akiojin merged 3 commits into
developfrom
bugfix/issue-54

Conversation

@akiojin

@akiojin akiojin commented Mar 2, 2026

Copy link
Copy Markdown
Owner

Summary

Changed Files

File Changes
ScreenshotHandler.cs IsLocalPath + outputPath正規化 + ResolveWorkspaceRoot修正
VideoCaptureHandler.cs IsLocalPath + s_OutputPath正規化 + ResolveWorkspaceRoot修正
ProfilerHandler.cs s_OutputPath正規化 + ResolveWorkspaceRoot修正

Test plan

  • cargo fmt --all -- --check — pass
  • cargo clippy --all-targets -- -D warnings — pass
  • cargo test --all-targets — 132/132 pass
  • C# コンパイル確認(Unity Editor 接続時)
  • 同一OS: workspaceRoot が有効なローカルパスの場合、従来通り使用される
  • クロスOS: Linux パスが Windows で IsLocalPath に弾かれフォールバック
  • 返却パスが常にフォワードスラッシュで統一されていること

Closes #54

🤖 Generated with Claude Code

When unity-cli runs on Linux (Docker) and connects to a Windows Unity host,
workspaceRoot from Linux is invalid on Windows, and Path.Combine produces
backslash-separated paths that break JSON responses.

- Add IsLocalPath guard to reject foreign-OS paths and fallback to local resolution
- Normalize all output paths with .Replace('\\', '/') for consistent forward slashes
- Align ResolveWorkspaceRoot in Screenshot/Video/Profiler handlers with UnityCliBridgeHost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/issue-54

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@akiojin
akiojin changed the base branch from main to develop March 2, 2026 12:20
@akiojin
akiojin merged commit 3aed2e5 into develop Mar 2, 2026
11 checks passed
@akiojin
akiojin deleted the bugfix/issue-54 branch March 2, 2026 16:47
@akiojin akiojin mentioned this pull request Mar 2, 2026
akiojin added a commit that referenced this pull request Mar 3, 2026
fix: cross-platform path mismatch in capture handlers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker(Linux) 呼び出し + Windows Unity ホストでキャプチャ出力パスが不整合(ファイルが見えない)

1 participant