Index: trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- trunk/psastro/src/psastroLoadRefstars.c	(revision 12806)
+++ trunk/psastro/src/psastroLoadRefstars.c	(revision 14371)
@@ -19,5 +19,6 @@
     // XXX CATDIR needs to look up abstracted name from psastro.config
     // XXX which is then selected from the top-level ipprc.config
-    char *CATDIR = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
+    char *catdir = psMetadataLookupStr(NULL, recipe, "DVO.CATDIR");
+    psString CATDIR = pmConfigConvertFilename(catdir, config, false); // Resolved filename
     PS_ASSERT (CATDIR, NULL);
 
@@ -31,4 +32,5 @@
     if ((fd = mkstemp (tempFile)) == -1) {
         psError(PSASTRO_ERR_REFSTARS, true, "error creating temp output file\n");
+        psFree(CATDIR);
         return NULL;
     }
@@ -47,5 +49,6 @@
     if (strcasecmp(CATDIR, "NONE")) {
         psStringAppend (&getstarCommand, " -D CATDIR %s", CATDIR);
-    } 
+    }
+    psFree(CATDIR);
 
     // psStringAppend (&getstarCommand, " -D CATMODE mef -maglim %f -region %f %f %f %f -o %s", MAGmax, RAmin, DECmin, RAmax, DECmax, tempFile);
@@ -81,5 +84,5 @@
 
     if (table == NULL) {
-	psError(PSASTRO_ERR_REFSTARS, true, "failure to load astrometric reference\n");
+        psError(PSASTRO_ERR_REFSTARS, true, "failure to load astrometric reference\n");
         return NULL;
     }
@@ -119,9 +122,9 @@
     // dump or plot the available refstars
     if (psTraceGetLevel("psastro.dump") > 0) {
-	psastroDumpRefstars (refstars, "refstars.dat");
+        psastroDumpRefstars (refstars, "refstars.dat");
     }
 
     if (psTraceGetLevel("psastro.plot") > 0) {
-	psastroPlotRefstars (refstars);
+        psastroPlotRefstars (refstars);
     }
 
