diff --git a/src/Tools/psxcdgen_ex/src/types/mod.rs b/src/Tools/psxcdgen_ex/src/types/mod.rs index edf425bf..fb8aa44a 100644 --- a/src/Tools/psxcdgen_ex/src/types/mod.rs +++ b/src/Tools/psxcdgen_ex/src/types/mod.rs @@ -47,8 +47,9 @@ pub struct DirectoryName { } impl DirectoryName { - pub fn from_str(str: &str) -> Result { - Ok(DirectoryName{name: DString::from_str(str)?}) + pub fn from_str(dir_name: &str) -> Result { + let dir_name = dir_name.to_uppercase(); + Ok(DirectoryName{name: DString::from_str(dir_name.as_ref())?}) } } @@ -59,6 +60,7 @@ pub struct FileName { impl FileName { pub fn from_str(file_name: &str) -> Result { + let file_name = file_name.to_uppercase(); let (name, ext) = { let mut sub_str = file_name.split('.'); (Error::ok_or_new(sub_str.next(), || "File name can't be emplty".to_owned())?, sub_str.next()) @@ -82,4 +84,4 @@ impl Default for Properties { fn default() -> Self { Properties{lba: None, length: None} } -} \ No newline at end of file +}