]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Sep 2014 10:21:56 +0000 (10:21 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Sep 2014 10:21:56 +0000 (10:21 +0000)
inc/ws/Util/packager/class.ws.packager.php

index 238394a941e8f7a54b6c63e7f56d37d8dbeefb76..47391756371d73e7c8e9ac16ada535f9afa84629 100644 (file)
@@ -14,6 +14,7 @@ class wsPackager {
        protected $zip;
        protected $workingDir;
        protected $whole = true;
+       protected $_clean = true;
        public $cleanOnDestruct = true;
 
        public static function package($book_id, $version, $zip = true) {
@@ -40,6 +41,8 @@ class wsPackager {
        }
 
        public function __construct($book_id, $vdir = null, $whole = true) {
+
+               $this->_clean = (null === $vdir);
                global $core;
 
                $this->book_id = $book_id;
@@ -191,8 +194,10 @@ class wsPackager {
        }
 
        protected function cleanVdir() {
+               if (!$this->_clean) {
+                       return;
+               }
                if (file_exists($this->vdir)) {
-
                        // Suppression du rĂ©pertoire si il existe
                        $rm = new cubeCommandLine('rm');
                        $rm->setArg('r');