From cd236d693d1df3e20c370c97a98c51ba3fcbd610 Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 17 Jan 2007 22:26:53 +0000 Subject: Added PRADO_CHMOD constant so that users can specify the permission of PRADO-created directories --- framework/IO/TTarFileExtractor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/IO') diff --git a/framework/IO/TTarFileExtractor.php b/framework/IO/TTarFileExtractor.php index 5256141f..74bb32b8 100644 --- a/framework/IO/TTarFileExtractor.php +++ b/framework/IO/TTarFileExtractor.php @@ -455,12 +455,12 @@ class TTarFileExtractor if ($v_extract_file) { if ($v_header['typeflag'] == "5") { if (!@file_exists($v_header['filename'])) { - if (!@mkdir($v_header['filename'], 0777)) { + if (!@mkdir($v_header['filename'], PRADO_CHMOD)) { $this->_error('Unable to create directory {' .$v_header['filename'].'}'); return false; } - chmod($v_header['filename'], 0777); + chmod($v_header['filename'], PRADO_CHMOD); } } else { if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) { @@ -546,11 +546,11 @@ class TTarFileExtractor (!$this->_dirCheck($p_parent_dir))) return false; - if (!@mkdir($p_dir, 0777)) { + if (!@mkdir($p_dir, PRADO_CHMOD)) { $this->_error("Unable to create directory '$p_dir'"); return false; } - chmod($p_dir,0777); + chmod($p_dir,PRADO_CHMOD); return true; } -- cgit v1.2.3