[Fusionforge-commits] r15254 - trunk/src/common/frs

Franck VILLAUME nerville at fusionforge.org
Sun Apr 1 21:31:28 CEST 2012


Author: nerville
Date: 2012-04-01 21:31:27 +0200 (Sun, 01 Apr 2012)
New Revision: 15254

Modified:
   trunk/src/common/frs/FRSPackage.class.php
Log:
fix delete release

Modified: trunk/src/common/frs/FRSPackage.class.php
===================================================================
--- trunk/src/common/frs/FRSPackage.class.php	2012-04-01 19:11:50 UTC (rev 15253)
+++ trunk/src/common/frs/FRSPackage.class.php	2012-04-01 19:31:27 UTC (rev 15254)
@@ -6,6 +6,7 @@
  * Copyright 2009, Roland Mas
  * Copyright (C) 2011-2012 Alain Peyrat - Alcatel-Lucent
  * Copyright 2011, Franck Villaume - Capgemini
+ * Copyright 2012, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -470,6 +471,8 @@
 			$this->setError('Package::delete error: trying to delete root dir');
 			return false;
 		}
+		$this->deleteNewestReleaseFilesAsZip();
+
 		if (is_dir($dir))
 			rmdir($dir);
 
@@ -499,7 +502,7 @@
 		}
 	}
 
-	public function getNewestReleaseZipName () {
+	public function getNewestReleaseZipName() {
 		return $this->getFileName()."-latest.zip";
 	}
 
@@ -528,6 +531,12 @@
 		$zip->close();
 	}
 
+	public function deleteNewestReleaseFilesAsZip() {
+		if (file_exists($this->getNewestReleaseZipPath()))
+			unlink($this->getNewestReleaseZipPath());
+		return true;
+	}
+
 }
 
 // Local Variables:




More information about the Fusionforge-commits mailing list