mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
fix: the issue where preview fails when the path length exceeds 255 characters (#280)
This commit is contained in:
@@ -49,7 +49,8 @@ pub fn check_path_length(path_name: &str) -> Result<()> {
|
||||
let mut count = 0usize;
|
||||
for c in path_name.chars() {
|
||||
match c {
|
||||
'/' | '\\' if cfg!(target_os = "windows") => count = 0, // Reset
|
||||
'/' => count = 0,
|
||||
'\\' if cfg!(target_os = "windows") => count = 0, // Reset
|
||||
_ => {
|
||||
count += 1;
|
||||
if count > 255 {
|
||||
|
||||
Reference in New Issue
Block a user