675 Ok(Some(directory_mtime)) => directory_mtime, |
675 Ok(Some(directory_mtime)) => directory_mtime, |
676 Ok(None) => { |
676 Ok(None) => { |
677 // The directory was modified too recently, |
677 // The directory was modified too recently, |
678 // don’t cache its `read_dir` results. |
678 // don’t cache its `read_dir` results. |
679 // |
679 // |
680 // 1. A change to this directory (direct child was added or |
680 // 1. A change to this directory (direct child was |
681 // removed) cause its mtime to be set (possibly truncated) |
681 // added or removed) cause its mtime to be set |
682 // to `directory_mtime` |
682 // (possibly truncated) to `directory_mtime` |
683 // 2. This `status` algorithm calls `read_dir` |
683 // 2. This `status` algorithm calls `read_dir` |
684 // 3. An other change is made to the same directory is made so |
684 // 3. An other change is made to the same directory is |
685 // that calling `read_dir` agin would give different |
685 // made so that calling `read_dir` agin would give |
686 // results, but soon enough after 1. that the mtime stays |
686 // different results, but soon enough after 1. that |
687 // the same |
687 // the mtime stays the same |
688 // |
688 // |
689 // On a system where the time resolution poor, this |
689 // On a system where the time resolution poor, this |
690 // scenario is not unlikely if all three steps are caused |
690 // scenario is not unlikely if all three steps are caused |
691 // by the same script. |
691 // by the same script. |
692 return Ok(()); |
692 return Ok(()); |