Generating the FQFN (full-qualified file name) may fail in the future
authorRoland Häder <roland@mxchange.org>
Thu, 20 Sep 2012 17:49:47 +0000 (17:49 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Sep 2012 17:49:47 +0000 (17:49 +0000)
inc/classes/main/database/databases/class_LocalFileDatabase.php

index efe6951..c6dfc0e 100644 (file)
@@ -418,11 +418,11 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackendIn
         * @throws      SqlException    If an SQL error occurs
         */
        public function queryInsertDataSet (StoreableCriteria $dataSetInstance) {
-               // Create full path name
-               $fqfn = $this->generateFqfnFromDataSet($dataSetInstance, md5($dataSetInstance->getUniqueValue()));
-
                // Try to save the request away
                try {
+                       // Create full path name
+                       $fqfn = $this->generateFqfnFromDataSet($dataSetInstance, md5($dataSetInstance->getUniqueValue()));
+
                        // Write the data away
                        $this->writeDataArrayToFqfn($fqfn, $dataSetInstance->getCriteriaArray());