@@ -413,9 +413,8 @@ mod op {
413
413
#[ cfg( target_os = "macos" ) ]
414
414
match self . arg . valid & FATTR_CRTIME {
415
415
0 => None ,
416
- _ => Some (
417
- SystemTime :: UNIX_EPOCH + Duration :: new ( self . arg . crtime , self . arg . crtimensec ) ,
418
- ) ,
416
+ _ => SystemTime :: UNIX_EPOCH
417
+ . checked_add ( Duration :: new ( self . arg . crtime , self . arg . crtimensec ) ) ,
419
418
}
420
419
#[ cfg( not( target_os = "macos" ) ) ]
421
420
None
@@ -424,9 +423,8 @@ mod op {
424
423
#[ cfg( target_os = "macos" ) ]
425
424
match self . arg . valid & FATTR_CHGTIME {
426
425
0 => None ,
427
- _ => Some (
428
- SystemTime :: UNIX_EPOCH + Duration :: new ( self . arg . chgtime , self . arg . chgtimensec ) ,
429
- ) ,
426
+ _ => SystemTime :: UNIX_EPOCH
427
+ . checked_add ( Duration :: new ( self . arg . chgtime , self . arg . chgtimensec ) ) ,
430
428
}
431
429
#[ cfg( not( target_os = "macos" ) ) ]
432
430
None
@@ -435,10 +433,8 @@ mod op {
435
433
#[ cfg( target_os = "macos" ) ]
436
434
match self . arg . valid & FATTR_BKUPTIME {
437
435
0 => None ,
438
- _ => Some (
439
- SystemTime :: UNIX_EPOCH
440
- + Duration :: new ( self . arg . bkuptime , self . arg . bkuptimensec ) ,
441
- ) ,
436
+ _ => SystemTime :: UNIX_EPOCH
437
+ . checked_add ( Duration :: new ( self . arg . bkuptime , self . arg . bkuptimensec ) ) ,
442
438
}
443
439
#[ cfg( not( target_os = "macos" ) ) ]
444
440
None
0 commit comments