added log lines

This commit is contained in:
2026-03-02 23:00:24 +01:00
parent 6bb41e7d72
commit 53e4614970
5 changed files with 60 additions and 10 deletions

View File

@@ -1,3 +1,5 @@
use log::debug;
use crate::{
basic_types::{ModdedInstance, RootConfig},
utils::walk_files_recursive,
@@ -10,6 +12,7 @@ pub fn link_instance_to_target(
instance: &ModdedInstance,
target: impl AsRef<Path>,
) -> Result<(), io::Error> {
debug!("Linking instance to {}", target.as_ref().to_string_lossy());
for installed_mod in &instance.mods {
let mod_config = root_config.get_mod_by_id(&installed_mod.mod_id()).unwrap();
let mod_source_root = root_config.get_mod_location(&mod_config);
@@ -28,6 +31,7 @@ pub fn link_game_to_target(
game_dir: impl AsRef<Path>,
target: impl AsRef<Path>,
) -> Result<(), io::Error> {
debug!("Linking install to {}", target.as_ref().to_string_lossy());
walk_files_recursive(&game_dir)?.try_for_each(|file| {
let link_target = file.path();
let link_name = target
@@ -50,6 +54,7 @@ pub fn create_plugins_txt(
instance: &ModdedInstance,
target: impl AsRef<Path>,
) -> Result<(), io::Error> {
debug!("Generating plugins.txt");
let mut file = fs::File::create(target.as_ref().join("plugins.txt"))?;
writeln!(file, "# Auto generated. DO NOT EDIT MANUALLY!")?;