Skip to content

Commit

Permalink
fix:rasp_server mkdir -p
Browse files Browse the repository at this point in the history
  • Loading branch information
kulukami committed Jul 6, 2023
1 parent 8e5e872 commit 8101073
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rasp/rasp_server/src/comm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use log::*;
use bytes::Bytes;
use std::collections::HashMap;
use std::fs;
use std::fs::create_dir;
use std::fs::create_dir_all;
use std::os::unix::prelude::PermissionsExt;
use std::path::Path;
use std::sync::Arc;
Expand All @@ -30,9 +30,9 @@ pub fn clean_bind_addr(addr: &str) -> Result<(), String> {
}
if let Some(d) = Path::new(addr.clone()).parent() {
if !d.exists() {
match create_dir(d) {
Ok(_) => {},
Err(e) => return Err(format!("create dir failed: {:?} {}", d, e))
match create_dir_all(d) {
Ok(_) => {}
Err(e) => return Err(format!("create dir failed: {:?} {}", d, e)),
}
}
}
Expand Down

0 comments on commit 8101073

Please sign in to comment.