Selaa lähdekoodia

Make file_force_contents() compatible in non-windows environments

Vijayakrishnan 5 vuotta sitten
vanhempi
commit
7081b63b57
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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);
             }
         }