Skip to content

Commit

Permalink
server: fix fs storage path when creating
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaohei committed Jul 22, 2024
1 parent 7a342bc commit 144f806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/storage/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ pub async fn hash() -> Result<String> {
/// new_operator load storage
pub async fn new_operator() -> Result<Operator> {
let settings = get().await?;
std::fs::create_dir_all(&settings.local_path)?;
let abs_path = std::path::Path::new(&settings.local_path).canonicalize()?;
debug!("fs storage path: {:?}", abs_path);
std::fs::create_dir_all(&abs_path)?;
let mut builder = Fs::default();
builder.root(abs_path.to_str().unwrap());
let op: Operator = Operator::new(builder)?.finish();
Expand Down

0 comments on commit 144f806

Please sign in to comment.