From 25118fc0a78952450e4575f48a7d7356787a7330 Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 6 Oct 2022 21:23:40 +0200 Subject: [PATCH] Create CD desc --- src/Tools/psxcdgen_ex/src/types/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 +}