use db and log paths as target/debug for debug run

This commit is contained in:
mykola2312 2024-02-29 17:51:11 +02:00
parent 506a2287b9
commit 397178e856
2 changed files with 3 additions and 9 deletions

6
.gitignore vendored
View file

@ -1,9 +1,3 @@
/target /target
.env* .env*
*.json *.json
*.txt
*.m4a
*.mp3
*.mp4
*.db
*.log*

View file

@ -1,13 +1,13 @@
use std::path::Path; use std::path::Path;
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
pub const VAR_LIB: &str = "."; pub const VAR_LIB: &str = "target/debug";
#[cfg(not(debug_assertions))] #[cfg(not(debug_assertions))]
pub const VAR_LIB: &str = "/var/lib/mk-dl-bot"; pub const VAR_LIB: &str = "/var/lib/mk-dl-bot";
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
pub const VAR_LOG: &str = "."; pub const VAR_LOG: &str = "target/debug";
#[cfg(not(debug_assertions))] #[cfg(not(debug_assertions))]
pub const VAR_LOG: &str = "/var/log/mk-dl-bot"; pub const VAR_LOG: &str = "/var/log/mk-dl-bot";