优化:小重构restore 提升可读性

This commit is contained in:
mrbeanc
2023-12-23 20:12:22 +08:00
parent 9cbe0a5031
commit 655224e1cb
3 changed files with 49 additions and 40 deletions

View File

@@ -112,7 +112,7 @@ impl Index {
pub fn get_deleted_files(&self, dir: &Path) -> Vec<PathBuf> {
let mut files = Vec::new();
self.entries.keys().for_each(|file| {
if !file.exists() && util::is_parent_dir(file, dir) {
if !file.exists() && util::is_sub_path(file, dir) {
files.push(file.clone());
}
});