You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rust cannot handle long paths on Linux. It fails on paths longer than 4096 bytes.
use std::fs::{create_dir, read_dir};use std::env::{current_dir, set_current_dir};fnmain(){let dir = current_dir().unwrap();let name = "a";for i in0..2200{if i % 100 == 0{println!("Create dir at level {}.", i);}let d = current_dir().unwrap();read_dir(d).unwrap();// fails for long pathscreate_dir(name).unwrap();set_current_dir(name).unwrap();}}
The text was updated successfully, but these errors were encountered:
nagisa
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Jun 1, 2017
This is a limitation of the operating system. On Linux, you can find out the maximal length for a relative path with getconf PATH_MAX / on the command-line or with the POSIX function pathconf("/", _PC_PATH_MAX).
I hope you reopen this issue since the doc doesn't specify the detailed implementation of this function. Maybe there could be an improvement? Have people already discussed this topic somewhere?
Rust cannot handle long paths on Linux. It fails on paths longer than 4096 bytes.
The text was updated successfully, but these errors were encountered: