Always read file header.
authorRoland Haeder <roland@mxchange.org>
Sun, 18 May 2014 09:27:59 +0000 (11:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 18 May 2014 09:27:59 +0000 (11:27 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/stacker/file/class_BaseFileStack.php

index b4a9133006462eb2d47afacc3f2712359ce17a04..c768db3ea87acab508164b60bdb8e3e4e7c33dd8 100644 (file)
@@ -405,16 +405,18 @@ class BaseFileStack extends BaseStacker {
                $this->setIteratorInstance($iteratorInstance);
 
                // Is the file's header initialized?
-               if ($this->isFileHeaderInitialized()) {
-                       // Then load it
-                       $this->readFileHeader();
-               } else {
+               if (!$this->isFileHeaderInitialized()) {
                        // No, then create it (which may pre-allocate the stack)
                        $this->createFileHeader();
 
                        // And pre-allocate a bit
                        $this->preAllocateFile();
-               }
+               } // END - if
+
+               // Load the file header
+               $this->readFileHeader();
+
+               // Try to read file stack to speed up its processing.
        }
 
        /**