On Tue, Dec 5, 2017 at 3:00 AM, Gregory Szorc <g...@mozilla.com> wrote:
> My understanding from contributing to Mercurial (version control tools are
> essentially virtual filesystems that need to store paths and realize them
> on multiple operating systems and filesystems) is as follows.

When writing system tools that work with files, it makes sense to do
things correctly--i.e. the way Rust's standard library does with
Path/PathBuf being distinct types from text strings capable of
round-tripping bytes on *nix and 16-bit units on Windows.

Considering that Firefox isn't a low-level file management tool and
already has a legacy of letting file paths not fully stay within
nsIFile but may have places where they travel as JS strings or
OS.File, I think it's not worthwhile to go through the engineering and
unit testing effort to support profile directory / download directory
/ file upload paths that aren't valid UTF-16 on Windows or that aren't
valid UTF-8 on *nix.

On Windows, though, we probably should run our unit tests with paths
that are valid UTF-16 but contain characters that aren't representable
in the system's "ANSI code page".

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to