Index: trunk/ippTools/src/pxdata.c.template
===================================================================
--- trunk/ippTools/src/pxdata.c.template	(revision 14102)
+++ trunk/ippTools/src/pxdata.c.template	(revision 14104)
@@ -40,47 +40,55 @@
     PS_ASSERT_PTR_NON_NULL(filename, NULL);
 
-    psString filepath = NULL;
+    {
+        psString filepath = NULL;
 
-    // look to see if PXDATA is set
-    char *PXDATA = getenv("PXDATA");
-    if (PXDATA) {
-        // if it is, then prepend filename to PXDATA
-        psStringAppend(&filepath, "%s/%s", PXDATA, filename);
+        // look to see if PXDATA is set
+        char *PXDATA = getenv("PXDATA");
+        if (PXDATA) {
+            // if it is, then prepend filename to PXDATA
+            psStringAppend(&filepath, "%s/%s", PXDATA, filename);
+        }
+
+        // see if we have a valid filename
+        if (test_f(filepath)) {
+            // if we do, slurp the file
+            psString data = psSlurpFilename(filepath);
+            if (!data) {
+                psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+                psFree(filepath);
+                return NULL;
+            }
+            psTrace("pxdata", PS_LOG_INFO, "slupred %s", filepath);
+            psFree(filepath);
+
+            return data;
+        }
+
+        psFree(filepath);
     }
 
-    // see if we have a valid filename
-    if (test_f(filepath)) {
-        // if we do, slurp the file
-        psString data = psSlurpFilename(filepath);
-        if (!data) {
-            psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+    {
+        psString filepath = NULL;
+
+        // look under our share path
+        psStringAppend(&filepath, "%s/%s", "PKGDATADIR", filename);
+
+        // see if we have a valid filename
+        if (test_f(filepath)) {
+            // if we do, slurp the file
+            psString data = psSlurpFilename(filepath);
+            if (!data) {
+                psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+                psFree(filepath);
+                return NULL;
+            }
+            psTrace("pxdata", PS_LOG_INFO, "slupred %s", filepath);
             psFree(filepath);
-            return NULL;
+
+            return data;
         }
-        psTrace("pxdata", PS_LOG_INFO, "slupred %s", filepath);
+
         psFree(filepath);
-
-        return data;
     }
-    psFree(filepath);
-
-    // look under our share path
-    psStringAppend(&filepath, "%s/%s", "PKGDATADIR", filename);
-
-    // see if we have a valid filename
-    if (test_f(filepath)) {
-        // if we do, slurp the file
-        psString data = psSlurpFilename(filepath);
-        if (!data) {
-            psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
-            psFree(filepath);
-            return NULL;
-        }
-        psTrace("pxdata", PS_LOG_INFO, "slupred %s", filepath);
-        psFree(filepath);
-
-        return data;
-    }
-    psFree(filepath);
 
     // couldn't find a matching filename
