mirror of
https://github.com/MrBeanCpp/MIT.git
synced 2026-07-02 09:16:03 +08:00
fix: 修正get_tracked_files(),不需要判断文件是否存在于磁盘
This commit is contained in:
@@ -168,13 +168,7 @@ impl Index {
|
||||
|
||||
/** 获取跟踪的文件列表 */
|
||||
pub fn get_tracked_files(&self) -> Vec<PathBuf> {
|
||||
let mut files = Vec::new();
|
||||
self.entries.keys().for_each(|file| {
|
||||
if file.exists() { //todo: cancel this check
|
||||
files.push(file.clone());
|
||||
}
|
||||
});
|
||||
files
|
||||
self.entries.keys().map(|f| f.clone()).collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user