From 2a257adda9963ed038d1bc254669cc8dc0319108 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Thu, 4 Jun 2009 12:22:32 +0000 Subject: [PATCH] MFH: Fixed creating directory structure when extracting phars --- ext/phar/phar/pharcommand.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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"; -- 2.50.1