Skip to content

Commit

Permalink
fix(services/unftp): add / when not presented (#5382)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-III authored Dec 4, 2024
1 parent ec1c53a commit 5efe24b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions integrations/unftp-sbe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ impl<User: UserDetail> StorageBackend<User> for OpendalStorage {
}

async fn mkd<P: AsRef<Path> + Send + Debug>(&self, _: &User, path: P) -> storage::Result<()> {
self.op
.create_dir(convert_path(path.as_ref())?)
.await
.map_err(convert_err)
let mut path_str = convert_path(path.as_ref())?.to_string();
if !path_str.ends_with('/') {
path_str.push('/');
}
self.op.create_dir(&path_str).await.map_err(convert_err)
}

async fn rename<P: AsRef<Path> + Send + Debug>(
Expand Down

0 comments on commit 5efe24b

Please sign in to comment.