Public bug reported:

Hello, the new uutils implementation of at least chmod requires
pathnames to be valid UTF-8. Linux makes no such requirement and neither
should our utilities. (Some filesystems offer UTF-8 validation and
canonicalization as features but these are not mandatory.)

See eg
https://github.com/uutils/coreutils/blob/main/src/uu/chmod/src/chmod.rs#L139

    // FIXME: enable non-utf8 paths
    let mut files: Vec<String> = matches
        .get_many::<String>(options::FILE)
        .map(|v| v.map(ToString::to_string).collect())
        .unwrap_or_default();

I'm not sure what the best resolution would be:

- Using OsString
- Using CString
- Using some other wrapper around a vector of u8
etc.

Thanks

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2117527

Title:
  chmod requires utf-8 pathnames

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2117527/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to