Finish launching modded versions of Minecraft

This commit is contained in:
Jai A
2021-11-10 21:52:55 -07:00
parent b0214cfcf8
commit 359e81083e
11 changed files with 496 additions and 412 deletions

17
theseus/src/util.rs Normal file
View File

@@ -0,0 +1,17 @@
use std::path::{Path, PathBuf};
use std::{env, io};
use path_clean::PathClean;
pub fn absolute_path(path: impl AsRef<Path>) -> io::Result<PathBuf> {
let path = path.as_ref();
let absolute_path = if path.is_absolute() {
path.to_path_buf()
} else {
env::current_dir()?.join(path)
}
.clean();
Ok(absolute_path)
}