Project

General

Profile

« Previous | Next » 

Revision 1976

Added by darkviper about 11 years ago

Packet AccessFile fixed indifferent handling of './..' directory entries

View differences:

AccessFileHelper.php
86 86
		$bResult = true;
87 87
		if (!is_writeable($sRootDir))
88 88
		{
89
			self::$aDelTreeLog[] = 'insufficient rights or directory not empty in : '.str_replace($oReg->AppPath, '', $sRootDir);
89 90
			return false;
90
			self::$aDelTreeLog[] = 'insufficient rights or directory not empty in : '.str_replace($oReg->AppPath, '', $sRootDir);
91 91
		}
92 92
		$oIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($sRootDir), RecursiveIteratorIterator::CHILD_FIRST);
93 93
		foreach ($oIterator as $oPath)
94 94
		{
95
			$sPath = trim(str_replace('\\', '/', $oPath->__toString()), '/');
96
			if ($oPath->isDir())
95
			$sPath = rtrim(str_replace('\\', '/', $oPath->__toString()), '/');
96
			if ($oPath->isDir() && !preg_match('/\.$/s', $sPath))
97 97
			{
98 98
				// proceed directories
99 99
				if (!rmdir($sPath))

Also available in: Unified diff