Fixed a bug with the deletion of the temp files
authorRouL <roul@codingcorner.info>
Fri, 15 Jul 2011 19:13:04 +0000 (21:13 +0200)
committerRouL <roul@codingcorner.info>
Fri, 15 Jul 2011 19:13:04 +0000 (21:13 +0200)
TMP_DIR already includes the TMP_FILE_PREFIX during the installation, so
it is not necessary to add it to the TMP_DIR. There was also an
exception thrown caused by this and the files in the temp-filder
weren't deleted.

wcfsetup/install/files/lib/system/WCFSetup.class.php

index a10d638369cd4aa0706484409ba080cdffb0879f..dd5c3e32c9440beb67e0412f12bc24bb0075c0cd 100644 (file)
@@ -1038,8 +1038,7 @@ class WCFSetup extends WCF {
                WCF::getTPL()->display('stepInstallPackages');\r
                \r
                // delete tmp files\r
-               $directory = TMP_DIR.TMP_FILE_PREFIX.'/';\r
-               $it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory));\r
+               $it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(TMP_DIR));\r
                while ($it->valid()) {\r
                        // delete all files except directories and packages (required for post-wcfsetup installation)\r
                        if (!$it->isDot() && !$it->isDir() && !preg_match('~\.tar(\.gz)?$~', $it->getSubPathName())) {\r