Explorar o código

Make file_force_contents() compatible in non-windows environments

Vijayakrishnan %!s(int64=5) %!d(string=hai) anos
pai
achega
7081b63b57
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
             }
         }