mirror of
https://github.com/WarrenHood/MCModpackManager.git
synced 2025-04-29 03:44:57 +01:00
Create mods dir if it doesn't exist and add context to errors when copying files
This commit is contained in:
parent
968699c52b
commit
183d8c9fe2
|
@ -249,7 +249,9 @@ impl ModpackMeta {
|
|||
}
|
||||
}
|
||||
}
|
||||
self.copy_files(&source_path, &target_path, file_meta.apply_policy.clone())?;
|
||||
self.copy_files(&source_path, &target_path, file_meta.apply_policy.clone()).with_context(
|
||||
|| format!("Syncing {} -> {}", source_path.display(), target_path.display())
|
||||
)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
@ -38,6 +38,7 @@ impl PinnedPackMeta {
|
|||
mods_dir: &PathBuf,
|
||||
download_side: DownloadSide,
|
||||
) -> Result<()> {
|
||||
let _ = std::fs::create_dir_all(mods_dir);
|
||||
let files = std::fs::read_dir(mods_dir)?;
|
||||
let mut pinned_files_cache = BTreeSet::new();
|
||||
for file in files.into_iter() {
|
||||
|
|
Loading…
Reference in a new issue