Parcourir la source

Make file_force_contents() compatible in non-windows environments

Vijayakrishnan il y a 5 ans
Parent
commit
7081b63b57
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      app/Console/Commands/GenerateTreeCommand.php

+ 1 - 1
app/Console/Commands/GenerateTreeCommand.php

@@ -664,7 +664,7 @@ class GenController {
         $file = array_pop($parts);
         $dir = '';
         foreach($parts as $part) {
-            if($part[strlen($part) - 1] !== ':') {
+            if(strlen($part) === 0 || $part[strlen($part) - 1] !== ':') {
                 if(!is_dir($dir .= "/$part")) mkdir($dir);
             }
         }