Fixed memory vulnerability in Windows version
This commit is contained in:
parent
2b8be4d1e9
commit
e2e25e4ac1
|
@ -15,6 +15,8 @@ Released on 14/12/2020
|
|||
- Enhancements:
|
||||
- File explorer:
|
||||
- Fixed color mismatch in local explorer
|
||||
- Bugfix:
|
||||
- Fixed memory vulnerability in Windows version
|
||||
|
||||
## 0.1.2
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ impl Localhost {
|
|||
#[cfg(target_os = "windows")]
|
||||
#[cfg(not(tarpaulin_include))]
|
||||
pub fn stat(&self, path: &Path) -> Result<FsEntry, HostError> {
|
||||
let attr: Metadata = match fs::metadata(path.clone()) {
|
||||
let attr: Metadata = match fs::metadata(path) {
|
||||
Ok(metadata) => metadata,
|
||||
Err(err) => return Err(HostError::new(HostErrorType::FileNotAccessible, Some(err))),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue