PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Archive_Tar » Bug #9352

Bug on _dirCheck function over nfs path

Details

Submitted2006-11-16 12:12 UTC
Fromtobia dot caneschi at register dot it
Assignedcellog
StatusClosed
PackageArchive_Tar
PHP Version5_2 CVS-2006-11-16
OSLinux Slackware
Roadmaps(Not assigned)

Comments

[2006-11-16 12:12 UTC] tobia dot caneschi at register dot it

Description:
------------
Over nfs filesystem is_dir caching return 0 on certain existent directory. the next mkdir exit the extract process improperly.

.....
function _dirCheck($p_dir)
{
//bug fix start
clearstatcache();
//bug fix end

if ((@is_dir($p_dir)) || ($p_dir == ''))
return true;

if (($p_parent_dir != $p_dir) &&
($p_parent_dir != '') &&
(!$this->_dirCheck($p_parent_dir)))
{
return false;
}

if (!@mkdir($p_dir, 0777)) {
$this->_error("Unable to create directory '$p_dir'");
return false;
}

return true;
}

.....