Made changes for Desktop app to work
This commit is contained in:
parent
fe04e17d63
commit
28c2db2a37
15 changed files with 74 additions and 38 deletions
|
|
@ -31,7 +31,6 @@ backoff = "0.4.0"
|
|||
futures = "0.3"
|
||||
rand = "0.8"
|
||||
indexmap = "2"
|
||||
directories = "5"
|
||||
dashmap = {version = "5.5.3", features = ["serde"]}
|
||||
|
||||
clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// TODO: this now stores only the routing table, but we also need AT LEAST the same socket address...
|
||||
|
||||
use librqbit_core::directories::get_configuration_directory;
|
||||
use librqbit_core::spawn_utils::spawn;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fs::OpenOptions;
|
||||
|
|
@ -72,8 +73,7 @@ impl PersistentDht {
|
|||
let config_filename = match config.config_filename.take() {
|
||||
Some(config_filename) => config_filename,
|
||||
None => {
|
||||
let dirs = directories::ProjectDirs::from("com", "rqbit", "dht")
|
||||
.context("cannot determine project directory for com.rqbit.dht")?;
|
||||
let dirs = get_configuration_directory("dht")?;
|
||||
let path = dirs.cache_dir().join("dht.json");
|
||||
info!("will store DHT routing table to {:?} periodically", &path);
|
||||
path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue