-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Path
s and filenames are not necessarily UTF-8
#7225
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
nominating feature-complete |
Accepted for backwards-compatible |
My last referenced commit is a month old, but I'm still working on this issue (currently finishing up the support for Windows paths). |
The issues here of dealing with filesystems that are not utf8 seem related to #2253, at least tangentially. |
MicahChalmer
added a commit
to MicahChalmer/rust-fuse-mc-original
that referenced
this issue
Sep 30, 2013
This commit was originally a sequence of trial-and-error commits that are a bit of a mess. Rather than include them, or trying to turn them retroactively into a separate commit for each of the below, I'm just squashing them into here. The changes in a nutshell: There are now tests that can run under src/test. So far it just checks that the hello world filesystem works. I no longer start an OS thread for each FS operation. There is one thread for the C API, which passes all commands back to a "dispatch task" running on the default scheduler, which in turn starts a new task on the default scheduler for each command. I don't try to turn byte strings I get from FUSE into utf-8. I still use std::path in the public API, and therefore could run into some problems due to rust-lang/rust#7225 but that will be addressed here when the underlying problem in std::path is taken care of. The public API now consists of a FuseMount object whose existence is tied to the mounting of a filesystem via FUSE. There is a Makefile whose main purpose is to allow you to quickly run the tests. Once "rustpkg test" works, it may not be needed anymore.
2 tasks
Merged
lilyball
added a commit
to lilyball/rust
that referenced
this issue
Oct 16, 2013
As documented in rust-lang#7225, we cannot rely on paths being representable in utf-8. Specifically, Linux allows anything (besides NUL) in a path. Redesign GenericPath in light of this. PosixPath hasn't been reimplemented yet for ~[u8].
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
May 20, 2021
…r=llogiq New lint: `unused_async` changelog: Adds a lint, `unused_async`, which checks for async functions with no await statements `unused_async` is a lint that reduces code smell and overhead by encouraging async functions to be refactored into synchronous functions. Fixes rust-lang#7176 ### Examples ```rust async fn get_random_number() -> i64 { 4 // Chosen by fair dice roll. Guaranteed to be random. } ``` Could be written as: ```rust fn get_random_number() -> i64 { 4 // Chosen by fair dice roll. Guaranteed to be random. } ``` Something like this, however, should **not** be caught by clippy: ```rust #[async_trait] trait AsyncTrait { async fn foo(); } struct Bar; #[async_trait] impl AsyncTrait for Bar { async fn foo() { println!("bar"); } } ```
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Path
and all interfaces directly with the file-system should probably use[u8]
rather than trying to coercestr
to handle these cases. (Similar issue to #7188.)The text was updated successfully, but these errors were encountered: