From: Hannes Magnusson Date: Thu, 4 Jun 2009 12:21:59 +0000 (+0000) Subject: Fixed creating directory structure when extracting phars X-Git-Tag: php-5.4.0alpha1~191^2~3410 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=872e9725ee28e98c4db938b0f7971c41e7104ba1;p=php Fixed creating directory structure when extracting phars --- diff --git a/ext/phar/phar/pharcommand.inc b/ext/phar/phar/pharcommand.inc index 005e84ef02..e50637b241 100755 --- a/ext/phar/phar/pharcommand.inc +++ b/ext/phar/phar/pharcommand.inc @@ -894,11 +894,10 @@ class PharCommand extends CLICommand $target = $dir . '/' . $sub; if (!file_exists(dirname($target))) { - if (!is_writable(dirname($target))) { - self::error("Operation could not be completed\n"); - } - - mkdir(dirname($target)); + @mkdir(dirname($target), 0777, true); + } + if (!file_exists(dirname($target))) { + self::error("Operation could not be completed\n"); } echo "$sub";