* when the dir is '/', skip it.

This commit is contained in:
wangchunsheng
2012-01-10 12:04:38 +00:00
parent 9ca68d2ed6
commit 5391e94384
+1
View File
@@ -58,6 +58,7 @@ class file
public function removeDir($dir)
{
$dir = realpath($dir) . '/';
if($dir == '/') return false;
if(!is_writable($dir)) return false;
if(!is_dir($dir)) return true;