pull/30/head
Jonas Kruckenberg 3 years ago
parent 36698d1436
commit 64aed34eff

1
Cargo.lock generated

@ -4200,6 +4200,7 @@ dependencies = [
"log 0.4.17",
"serde",
"serde_json",
"serde_repr",
"tauri",
"thiserror",
]

@ -252,7 +252,7 @@ impl LoggerBuilder {
LogTarget::Stderr => fern::Output::from(std::io::stderr()),
LogTarget::Folder(path) => {
if !path.exists() {
fs::create_dir_all(&path).unwrap();
fs::create_dir_all(path).unwrap();
}
fern::log_file(get_log_file_path(
@ -264,7 +264,7 @@ impl LoggerBuilder {
.into()
}
LogTarget::LogDir => {
let path = app_handle.path_resolver().log_dir().unwrap();
let path = app_handle.path_resolver().app_log_dir().unwrap();
if !path.exists() {
fs::create_dir_all(&path).unwrap();
}

@ -40,7 +40,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
#[cfg(feature = "protocol-asset")]
let asset_protocol_scope = app.asset_protocol_scope();
let app = app.clone();
let app_dir = app.path_resolver().app_dir();
let app_dir = app.path_resolver().app_data_dir();
if let Some(app_dir) = app_dir {
let scope_state_path = app_dir.join(SCOPE_STATE_FILENAME);

@ -13,6 +13,7 @@ serde_json.workspace = true
tauri.workspace = true
log.workspace = true
thiserror.workspace = true
serde_repr = "0.1"
[features]
system-tray = [ "tauri/system-tray" ]

@ -172,7 +172,7 @@ impl Store {
pub fn load<R: Runtime>(&mut self, app: &AppHandle<R>) -> Result<(), Error> {
let app_dir = app
.path_resolver()
.app_dir()
.app_data_dir()
.expect("failed to resolve app dir");
let store_path = app_dir.join(&self.path);
@ -187,7 +187,7 @@ impl Store {
pub fn save<R: Runtime>(&self, app: &AppHandle<R>) -> Result<(), Error> {
let app_dir = app
.path_resolver()
.app_dir()
.app_data_dir()
.expect("failed to resolve app dir");
let store_path = app_dir.join(&self.path);

Loading…
Cancel
Save