Repository navigation
fix(linux): fix file explorer opening wrong directory (#4397) - #4777
Conversation
The pathToURI function was using url.PathEscape which incorrectly escapes forward slashes (/ -> %2F). This caused file URIs like: /home/angaz -> file://%2Fhome%2Fangaz (broken) File managers couldn't parse these malformed URIs correctly, causing them to open the wrong directory (often a parent directory). Fixed by using url.URL struct to properly construct file URIs: /home/angaz -> file:///home/angaz (correct) Spaces and other special characters are still properly escaped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Warning Rate limit exceeded@leaanthony has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 29 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
…wailsapp#4777) The pathToURI function was using url.PathEscape which incorrectly escapes forward slashes (/ -> %2F). This caused file URIs like: /home/angaz -> file://%2Fhome%2Fangaz (broken) File managers couldn't parse these malformed URIs correctly, causing them to open the wrong directory (often a parent directory). Fixed by using url.URL struct to properly construct file URIs: /home/angaz -> file:///home/angaz (correct) Spaces and other special characters are still properly escaped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>



Summary
Fixes the file explorer opening the wrong directory on Linux when using
OpenFileManager().Root Cause
The
pathToURIfunction was usingurl.PathEscapewhich incorrectly escapes forward slashes:File managers couldn't parse these malformed URIs correctly, causing them to open the wrong directory (often a parent directory like
/homeinstead of/home/angaz).Fix
Changed to use
url.URLstruct which properly constructs file URIs:Spaces and other special characters are still properly escaped (e.g.,
My Documents→My%20Documents).Test plan
OpenFileManager("/home/username", true)opens the correct directoryFixes #4397
🤖 Generated with Claude Code