Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core/services/gdrive): Fix gdrive create_dir request: trim trailing / #4732

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions core/src/services/gdrive/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ impl PathQuery for GdrivePathQuery {
async fn create_dir(&self, parent_id: &str, name: &str) -> Result<String> {
let url = "https://www.googleapis.com/drive/v3/files";

// trim "/" at the end of name
let name = name.trim_end_matches("/");
Xuanwo marked this conversation as resolved.
Show resolved Hide resolved

let content = serde_json::to_vec(&json!({
"name": name,
"mimeType": "application/vnd.google-apps.folder",
Expand Down
Loading