Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
Signed-off-by: suyanhanx <[email protected]>
  • Loading branch information
suyanhanx committed Jun 19, 2024
1 parent cc5ae96 commit 7379cff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions core/src/services/aliyun_drive/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@ use crate::*;
#[serde(default)]
#[non_exhaustive]
pub struct AliyunDriveConfig {
/// root of this backend.
/// The Root of this backend.
///
/// All operations will happen under this root.
///
/// default to `/` if not set.
/// Default to `/` if not set.
pub root: Option<String>,
/// access_token of this backend.
/// The access_token of this backend.
///
/// Solution for client-only purpose. #4733
///
/// required if no client_id, client_secret and refresh_token are provided.
/// Required if no client_id, client_secret and refresh_token are provided.
pub access_token: Option<String>,
/// client_id of this backend.
/// The client_id of this backend.
///
/// required if no access_token is provided.
/// Required if no access_token is provided.
pub client_id: Option<String>,
/// client_secret of this backend.
/// The client_secret of this backend.
///
/// required if no access_token is provided.
/// Required if no access_token is provided.
pub client_secret: Option<String>,
/// refresh_token of this backend.
/// The refresh_token of this backend.
///
/// required if no access_token is provided.
/// Required if no access_token is provided.
pub refresh_token: Option<String>,
/// drive_type of this backend.
/// The drive_type of this backend.
///
/// All operations will happen under this type of drive.
///
Expand Down Expand Up @@ -106,7 +106,7 @@ impl Debug for AliyunDriveBuilder {
}

impl AliyunDriveBuilder {
/// Set root of this backend.
/// Set the root of this backend.
///
/// All operations will happen under this root.
pub fn root(&mut self, root: &str) -> &mut Self {
Expand Down Expand Up @@ -342,8 +342,8 @@ impl Access for AliyunDriveBackend {
let parent_path = get_parent(to);
let parent_file_id = self.core.ensure_dir_exists(parent_path).await?;

// if from and to are going to be placed in the same folder
// copy_path will fail as we cannot change name during this action.
// if from and to are going to be placed in the same folder,
// copy_path will fail as we cannot change the name during this action.
// it has to be auto renamed.
let auto_rename = file.parent_file_id == parent_file_id;
let res = self
Expand Down
4 changes: 2 additions & 2 deletions core/src/services/aliyun_drive/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ pub enum DriveType {
Default,
/// Use the backup type of Aliyun Drive.
///
/// fallback to the default type if no backup drive found.
/// Fallback to the default type if no backup drive is found.
Backup,
/// Use the resource type of Aliyun Drive.
///
/// fallback to the default type if no resource drive found.
/// Fallback to the default type if no resource drive is found.
Resource,
}

Expand Down

0 comments on commit 7379cff

Please sign in to comment.