mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
lib: ignore WriteZero for flush as well
This commit is contained in:
@@ -133,8 +133,11 @@ impl DiagDevice {
|
||||
return Err(DiagDeviceError::DeviceWriteFailed(err));
|
||||
}
|
||||
}
|
||||
self.file.flush().await
|
||||
.map_err(DiagDeviceError::DeviceWriteFailed)?;
|
||||
if let Err(err) = self.file.flush().await {
|
||||
if err.kind() != ErrorKind::WriteZero {
|
||||
return Err(DiagDeviceError::DeviceWriteFailed(err));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user