Date: January 13, 2026
File Modified: rdm-integration/image/app/plugin/impl/globus/common.go
- Checks if a string is a single letter (A-Z or a-z)
- Used to identify Windows drive letters
- Returns
falsefor multi-character names like "Users", "home", etc.
- Detects if we're on a Windows endpoint by examining the root directory listing
- Detection Strategy:
- Looks for drive letters (C, D, E, etc.) - counts occurrences
- Looks for Windows system folders (Windows, Users, Program Files, ProgramData) - case-insensitive
- Returns
trueif:driveLetters >= 2ORwindowsIndicators > 0
- Why this works:
- Windows with C, D, E drives →
driveLetters = 3→ TRUE ✅ - Windows with Users, Program Files →
windowsIndicators = 2→ TRUE ✅ - Linux with single "C" folder → No Windows indicators, only 1 drive letter → FALSE ✅
- Linux normal → No indicators → FALSE ✅
- Windows with C, D, E drives →
-
New Logic:
isWindows := false if path == "/" { isWindows = isWindowsDriveEnvironment(response) }
- Only detects Windows at root level (
path == "/") - Subsequent calls with non-root paths skip detection (already determined)
- Only detects Windows at root level (
-
Smart Path Construction:
if isWindows && v.AbsolutePath == "/" && isDriveLetter(v.Name) { id = v.Name + ":/" // Windows: "C" → "C:/" } else { id = v.AbsolutePath + v.Name + "/" // All others unchanged }
- Windows drive roots at root:
C→C:/ - Everything else: concatenate normally (Linux:
/home/→/home/user/) - Nested Linux folders named "C" are handled correctly:
/home/alice/C/stays as/home/alice/C/
- Windows drive roots at root:
- API returns drives as folders:
{Name: "C", AbsolutePath: "/"} - Detection: Sees multiple drives (C, D, E) OR Windows folders →
isWindows = true - Construction:
"C" → "C:/"✅ - Result: User can browse
C:/Users/,C:/Program Files/, etc.
- API returns normal folders:
{Name: "home", AbsolutePath: "/"} - Detection: No drive letters (only "home", "usr", "var"), no Windows folders →
isWindows = false - Construction: Normal concatenation →
/home/✅ - Result: No change in behavior, backward compatible
- API returns:
{Name: "C", AbsolutePath: "/"}, {Name: "home", AbsolutePath: "/"} - Detection: Single drive letter + no Windows indicators →
isWindows = false - Construction: Normal concatenation →
/C/✅ - Result: User can still access
/C/some/folder/
- Work the same as GCP endpoints based on their actual filesystem structure
- No special handling needed
$ cd /home/eryk/projects/rdm-integration/image && go build ./app/plugin/impl/globus/...
# No errors - code compiles successfully-
TestIsWindowsDriveEnvironment()- Windows, Linux, edge cases -
TestIsDriveLetter()- Single letters, multi-char, case variations -
TestListItemsPathConstruction()- Windows paths, Linux paths, nested paths
- Windows GCP Personal - Browse root, expand drives, navigate folders
- Linux GCP Personal - Verify no regression
- macOS GCP Personal - Verify no regression
- Linux with "C" folder - Verify it's accessible
- Server endpoints - Verify no regression
- Windows personal endpoint - browse from root
- Windows personal endpoint - select Documents folder
- Windows personal endpoint - select and transfer files
- Linux endpoint - verify all paths work
- macOS endpoint - verify all paths work
- Endpoint with custom DefaultDirectory - verify it's accessible
-
rdm-integration/image/app/plugin/impl/globus/common.go
- Added:
isDriveLetter()function (18 lines) - Added:
isWindowsDriveEnvironment()function (50 lines) - Modified:
listItems()function (added 8 lines of logic, 0 lines removed) - Total change: ~76 lines added, minimal complexity
- Added:
-
rdm-integration-frontend/globus_endpoint_windows.md
- Updated documentation with implementation status
- Updated success criteria
- Updated implementation plan with completed/pending items
- Platform detection at root only: Avoids repeated detection calls and improves performance
- Dual detection strategy: Checks for both drive letters AND Windows system folders for robustness
- Conservative threshold: Requires 2+ drive letters OR any Windows system folder to detect Windows
- Prevents false positives (single "C" folder on Linux)
- No configuration: Fully automatic - detects platform from available data
- No frontend changes: Backend-only fix, frontend receives correct paths
- Changes are isolated to path construction logic
- All other functionality unchanged
- No database, API, or frontend modifications
- Backward compatible with all endpoint types
- Compilation verified
- Single-letter folder on Linux: Safe (requires Windows indicators)
- Case variations (C vs c): Handled by case-insensitive comparison
- Mapped network drives: Work as drive letters
- Nested paths: Drive detection only at root
| Issue | Likelihood | Mitigation |
|---|---|---|
| Linux with only "C" folder | Very Low | Rare OS configuration |
| Globus API changes | Low | Detection still works with existing API format |
| Performance overhead | Very Low | Detection only at root, minimal calculations |
- Run unit tests on the new functions (or create them)
- Integration test with real Windows endpoint - highest priority
- Regression test on Linux/macOS endpoints
- Deploy to staging for user testing
- Document change in release notes
- Root cause analysis: globus_endpoint_windows.md
- Strategy A+ analysis: STRATEGY_A_ANALYSIS.md
- Code changes: common.go lines 52-136