diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Zip.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 9101eecb4..52f1bc3d0 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -99,9 +99,9 @@ class CI_Zip { */ function _get_mod_time($dir) { - // filemtime() will return false, but it does raise an error. - $date = (@filemtime($dir)) ? filemtime($dir) : getdate($this->now); - + // filemtime() may return false, but raises an error for non-existing files + $date = (file_exists($dir)) ? filemtime($dir): getdate($this->now); + $time['file_mtime'] = ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2; $time['file_mdate'] = (($date['year'] - 1980) << 9) + ($date['mon'] << 5) + $date['mday']; |