diff --git a/src/Tools/Tests/ISO_Planschbecken.xml b/src/Tools/Tests/ISO_Planschbecken.xml
index 975c0552..9c895cd5 100644
--- a/src/Tools/Tests/ISO_Planschbecken.xml
+++ b/src/Tools/Tests/ISO_Planschbecken.xml
@@ -10,7 +10,7 @@
../Tests/ISO_Planschbecken.xml
- ../Tests/ISO_Planschbecken.xml
+ ../Tests/ISO_Planschbecken.xml
diff --git a/src/Tools/psxcdgen_ex/src/config_reader/mod.rs b/src/Tools/psxcdgen_ex/src/config_reader/mod.rs
index 2eff102a..b635c56a 100644
--- a/src/Tools/psxcdgen_ex/src/config_reader/mod.rs
+++ b/src/Tools/psxcdgen_ex/src/config_reader/mod.rs
@@ -15,15 +15,10 @@ impl Configuration {
}
pub struct File {
- pub name: String,
- pub path: PathBuf,
- pub is_hidden: bool,
-}
-
-impl File {
- pub fn new() -> File {
- File{name: String::new(), path: PathBuf::new(), is_hidden: false}
- }
+ pub name: String,
+ pub path: PathBuf,
+ pub is_hidden: bool,
+ pub padded_size: Option,
}
pub struct Directory {
diff --git a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs
index cbfcea8a..df2ababb 100644
--- a/src/Tools/psxcdgen_ex/src/config_reader/xml.rs
+++ b/src/Tools/psxcdgen_ex/src/config_reader/xml.rs
@@ -1,4 +1,5 @@
use std::path::PathBuf;
+use tool_helper::format_if_error;
use crate::config_reader::Directory;
use super::{Configuration, ErrorString, File};
@@ -46,9 +47,10 @@ fn parse_description(description: roxmltree::Node, config: &mut Configuration) {
fn parse_track(track: roxmltree::Node, config: &mut Configuration) -> Result<(), Error> {
fn parse_file(file: roxmltree::Node, is_hidden: bool) -> Result {
Ok(File{
- name: String::from(file.attribute("name").unwrap_or_default()),
- path: PathBuf::from(file.text().unwrap_or_default()),
- is_hidden: is_hidden | parse_boolean_attribute(&file, "hidden")?
+ name: String::from(file.attribute("name").unwrap_or_default()),
+ path: PathBuf::from(file.text().unwrap_or_default()),
+ is_hidden: is_hidden | parse_boolean_attribute(&file, "hidden")?,
+ padded_size: read_padded_size(&file)?,
})
}
@@ -75,6 +77,17 @@ fn parse_track(track: roxmltree::Node, config: &mut Configuration) -> Result<(),
parse_file_system(track, &mut config.root, false)
}
+fn read_padded_size(xml: &roxmltree::Node) -> Result