Made changes for Desktop app to work

This commit is contained in:
Igor Katson 2023-12-02 21:12:15 +00:00
parent fe04e17d63
commit 28c2db2a37
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
15 changed files with 74 additions and 38 deletions

View file

@ -29,6 +29,7 @@ buffers = {path="../buffers", package="librqbit-buffers", version = "2.2.1"}
bencode = {path = "../bencode", default-features=false, package="librqbit-bencode", version="2.2.1"}
clone_to_owned = {path="../clone_to_owned", package="librqbit-clone-to-owned", version = "2.2.1"}
itertools = "0.12"
directories = "5"
[dev-dependencies]
serde_json = "1"
serde_json = "1"

View file

@ -0,0 +1,6 @@
use anyhow::Context;
pub fn get_configuration_directory(application: &str) -> anyhow::Result<directories::ProjectDirs> {
directories::ProjectDirs::from("com", "rqbit", application)
.with_context(|| format!("cannot determine project directory for com.rqbit.{application}"))
}

View file

@ -1,4 +1,5 @@
pub mod constants;
pub mod directories;
pub mod id20;
pub mod lengths;
pub mod magnet;