Browse Source

! Fixed uninstall test not able to get the correct path for the files and directories to remove

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
c3d185273e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Sources/Packages.php

+ 6 - 1
Sources/Packages.php

@@ -645,7 +645,12 @@ function PackageInstallTest()
 		if (empty($thisAction))
 			continue;
 
-		if (isset($action['filename']) && !file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']))
+		if ($context['uninstalling'])
+			$file = in_array($action['type'], array('remove-dir', 'remove-file')) ? $action['filename'] : $boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename'];
+		else
+			$file =  $boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename'];
+
+		if (isset($action['filename']) && !file_exists($file))
 		{
 			$context['has_failure'] = true;