Our Counterintuitive Fix for Android Path Normalization
Article Summary
Dropbox Android users couldn't see folders with Cyrillic characters or certain special names. The obvious fix? Way too risky to attempt.
Dropbox's Android app had path normalization bugs stemming from Python 2.5 quirks and whitespace handling mismatches. Gary Guo shares how the team fixed it without risking data loss for millions of users.
Key Takeaways
- Path normalization touched 100+ call sites and 600+ unit tests across 12 files
- Python 2.5's flawed unicode handling caused Greek and Cyrillic character bugs
- Global static variable enabled safe Stormcrow gating without major refactoring
- Crashes from empty folder names dropped to zero after rollout
- Test run showed 0.1% pathname inconsistency rate before full deployment
Critical Insight
A temporary global static variable solved a critical Android bug affecting file operations while avoiding the months of refactoring that elegant solutions would have required.