Permalink
Browse files

fixed: delete directory content

  • Loading branch information...
1 parent 8057172 commit da82314828fe46a3d47be46af73bccdd0cd74592 @Basti-sama committed Feb 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Util/File.util.php
@@ -90,7 +90,7 @@ public static function rmDirectoryContent($dir)
$openDir = self::getRecursiveDirectoryIterator($dir);
foreach($openDir as $file)
{
- if($file->isWritable() && !$file->isDot())
+ if($file->isWritable())
{
if($file->isDir())
{
@@ -275,7 +275,7 @@ public static function bytesToString($bytes)
public static function getRecursiveDirectoryIterator($dir, $mode = RecursiveIteratorIterator::CHILD_FIRST)
{
$dir = (substr($dir, -1) != "/") ? $dir."/" : $dir;
- return new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::CURRENT_AS_FILEINFO), $mode);
+ return new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS), $mode);
}
/**

0 comments on commit da82314

Please sign in to comment.