You've already forked AstralRinth
forked from didirus/AstralRinth
Misc settings (#137)
* Initial bug fixes * fix compile error on non-mac * Fix even more bugs * Fix more * fix more * fix build * fix build * Search fixes * Fix small instance ui * working basic * fix javaw issue * removed zip * working functions * merge fixes * fixed loadintg bar bug * menu fix * wait for settings to sync * safety expanded and for loading bars * swtiching to windows * minimize * default landing page * test link registry * url redirection * fix formatting * .mrpack windows * working mrpack reader * changed to one layer deep * working .mrpack + command handling for both opening and existing process * forge version numbers * working mac opening mrpack * reverted changes * prettier/fmt * missed debug statement * improvements + refactoring * renamed things to fit plugin * fixed bugs * removed println * overrides dont include mrpack * merge * fixes * fixes * fixed deletion * merge errors * force sync before export * removed testing * missed line * removed console log * mac error reverted * incoreclty named helper * additional fixes * added removed merges * fixed mislabled invokes * mac * added to new register method * comments, cleanup * mac clippy change * review changes * minor changes * moved create pack * removed playground compilation bug * fixed linux bug; other add ons * fixed review commets * cicd fix * mistaken import for prod * cicd fix --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Theseus directory information
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use tokio::fs;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct DirectoryInfo {
|
||||
@@ -11,7 +11,7 @@ pub struct DirectoryInfo {
|
||||
impl DirectoryInfo {
|
||||
/// Get all paths needed for Theseus to operate properly
|
||||
#[tracing::instrument]
|
||||
pub async fn init() -> crate::Result<Self> {
|
||||
pub fn init() -> crate::Result<Self> {
|
||||
// Working directory
|
||||
let working_dir = std::env::current_dir().map_err(|err| {
|
||||
crate::ErrorKind::FSError(format!(
|
||||
@@ -26,7 +26,7 @@ impl DirectoryInfo {
|
||||
"Could not find valid config dir".to_string(),
|
||||
))?;
|
||||
|
||||
fs::create_dir_all(&config_dir).await.map_err(|err| {
|
||||
fs::create_dir_all(&config_dir).map_err(|err| {
|
||||
crate::ErrorKind::FSError(format!(
|
||||
"Error creating Theseus config directory: {err}"
|
||||
))
|
||||
@@ -130,6 +130,11 @@ impl DirectoryInfo {
|
||||
.join("modrinth_logs")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn launcher_logs_dir(&self) -> PathBuf {
|
||||
self.config_dir.join("launcher_logs")
|
||||
}
|
||||
|
||||
/// Get the file containing the global database
|
||||
#[inline]
|
||||
pub fn database_file(&self) -> PathBuf {
|
||||
|
||||
Reference in New Issue
Block a user