Don't panic on vintage files (#33543)
Release Notes: - remoting: Fix a crash on the remote side when encountering files from before 1970.
This commit is contained in:
parent
c9ce4aec91
commit
14bb10d783
1 changed files with 1 additions and 1 deletions
|
@ -632,7 +632,7 @@ impl From<Timestamp> for SystemTime {
|
|||
|
||||
impl From<SystemTime> for Timestamp {
|
||||
fn from(time: SystemTime) -> Self {
|
||||
let duration = time.duration_since(UNIX_EPOCH).unwrap();
|
||||
let duration = time.duration_since(UNIX_EPOCH).unwrap_or_default();
|
||||
Self {
|
||||
seconds: duration.as_secs(),
|
||||
nanos: duration.subsec_nanos(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue