Beispiel #1
0
 /**
  * Sanitize dirs name (move dirs)
  */
 protected function sanitizeDir($dir)
 {
     if (basename($dir) != dmOs::sanitizeDirName(basename($dir))) {
         $renamedDir = dmOs::join(dirname($dir), dmOs::sanitizeDirName(basename($dir)));
         while (is_dir($renamedDir)) {
             $renamedDir = dmOs::randomizeDirName($renamedDir);
         }
         rename($dir, $renamedDir);
         $dir = $renamedDir;
     }
     return $dir;
 }