Skip to content

Commit

Permalink
fix: panic when directory name contains japanese characters
Browse files Browse the repository at this point in the history
  • Loading branch information
roele committed Jan 14, 2025
1 parent 97fee36 commit 728f2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/config_file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ fn hashed_path_filename(path: &Path) -> String {
let hash = hash_to_str(&canonicalized_path);
let trunc_str = |s: &OsStr| {
let mut s = s.to_str().unwrap().to_string();
s.truncate(20);
s = s.chars().take(20).collect();
s
};
let trust_path = dirs::TRUSTED_CONFIGS.join(hash_to_str(&hash));
Expand Down

0 comments on commit 728f2c8

Please sign in to comment.