Skip to content

Commit

Permalink
change to as_encoded_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Jan 25, 2024
1 parent 17c32a4 commit 89db9eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use std::{
ffi::{OsStr, OsString},
fs::DirEntry,
os::unix::ffi::OsStrExt,
path::PathBuf,
};

Expand Down Expand Up @@ -237,7 +236,7 @@ fn clean_name(path: &OsStr, _options: &OptionnalFields) -> OsString {
let mut new_name = String::new();
let mut vec_grapheme = Vec::with_capacity(4);
let mut last_was_underscore = false;
for byte in path.as_bytes().to_owned() {
for byte in path.as_encoded_bytes().to_owned() {
if vec_grapheme.len() == 0 && byte < 128 {
match byte {
0..=44 => {
Expand Down

0 comments on commit 89db9eb

Please sign in to comment.