ZutJoe commented on code in PR #3652:
URL:
https://github.com/apache/incubator-opendal/pull/3652#discussion_r1402234747
##########
core/src/services/azfile/core.rs:
##########
@@ -420,6 +420,21 @@ impl AzfileCore {
p = get_parent(p);
dirs.push_front(p);
}
+
+ let mut pop_dir_count = dirs.len() as u8;
+ for dir in dirs.iter().rev() {
+ let resp = self.azfile_get_path_properties(dir).await?;
+ if resp.status() == StatusCode::NOT_FOUND {
+ pop_dir_count -= 1;
+ continue;
+ }
+ break;
+ }
+
+ for _ in 0..pop_dir_count {
+ dirs.pop_front();
+ }
+
Review Comment:
`let dirs = dirs.iter().skip(pop_dir_count as usize).collect::<Vec<_>>();`
1. use `Vec` or `Vecdeque` ?
2. pop_dir_count type: `u8` or `usize` which is better ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]