Skip to content

Commit

Permalink
create work_dir if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-880 committed Jun 18, 2024
1 parent a51b116 commit b09f4fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion raphtory-graphql/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::{
};
use std::{
collections::HashMap,
env,
env, fs,
path::{Path, PathBuf},
sync::{Arc, Mutex},
};
Expand Down Expand Up @@ -70,6 +70,9 @@ impl RaphtoryServer {
maybe_graph_paths: Option<Vec<PathBuf>>,
maybe_cache_config: Option<CacheConfig>,
) -> Self {
if !work_dir.exists() {
fs::create_dir_all(work_dir).unwrap();
}
let data = Data::new(
work_dir,
maybe_graphs,
Expand Down

0 comments on commit b09f4fb

Please sign in to comment.