Changeset 966
- Timestamp:
- 11/23/08 16:50:33 (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
-
common/cache.php (modified) (3 diffs)
-
scripts/update-mimetypes (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/cache.php
r965 r966 1 1 <?php 2 require_once(IA_ROOT_DIR . "common/string.php"); 2 3 3 4 // Check if there is something in the cache newer that date. … … 15 16 // Recursively delete directories 16 17 function _recursive_delete($path) { 18 $path = realpath($path); 19 log_assert($path != IA_ROOT_DIR . "cache/" && 20 starts_with($path, IA_ROOT_DIR . "cache/")); 17 21 foreach (glob($path . "/*") as $file_name) { 18 22 if (is_dir($file_name)) { … … 83 87 $file_name = _disk_cache_path($cache_id); 84 88 85 @mkdir(dirname($file_name), 0777, true); 89 if (!is_dir(dirname($file_name))) { 90 log_assert(!file_exists(dirname($file_name)), 91 "Cache directory contains invalid files"); 92 93 $old_umask = umask(0); 94 @mkdir(dirname($file_name), 0777, true); 95 umask($old_umask); 96 } 86 97 $ret = @file_put_contents($file_name, $buffer, LOCK_EX); 87 98
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)