added log lines
This commit is contained in:
@@ -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!")?;
|
||||
|
||||
Reference in New Issue
Block a user