Index: trunk/psModules/src/camera/pmFPAfile.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfile.c	(revision 8848)
+++ trunk/psModules/src/camera/pmFPAfile.c	(revision 9436)
@@ -176,5 +176,5 @@
     if (strstr (newName, "{EXTNAME}") != NULL) {
         pmHDU *hdu = pmFPAviewThisHDU (view, file->fpa);
-        if (hdu->extname != NULL) {
+        if (hdu->extname && *hdu->extname) {
             newName = psStringSubstitute (newName, hdu->extname, "{EXTNAME}");
         }
@@ -183,5 +183,5 @@
         if (file->fpa != NULL) {
             char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.FILTER");
-            if (name != NULL) {
+            if (name && *name) {
                 newName = psStringSubstitute (newName, name, "{FILTER}");
             }
@@ -190,8 +190,11 @@
     if (strstr (newName, "{CAMERA}") != NULL) {
         if (file->fpa != NULL) {
-            char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.CAMERA");
-            if (name != NULL) {
+            // XXX this concept does not exist...
+            // char *name = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.CAMERA");
+            char *name = psStringCopy ("isp");
+            if (name && *name) {
                 newName = psStringSubstitute (newName, name, "{CAMERA}");
             }
+            psFree (name);
         }
     }
@@ -200,7 +203,9 @@
             char *filterName = psMetadataLookupStr (NULL, file->fpa->concepts, "FPA.FILTER");
             psMetadata *filterTable = psMetadataLookupPtr (NULL, file->camera, "FILTER.ID");
-            if (filterName && filterTable) {
+            if (filterName && *filterName && filterTable) {
                 char *ID = psMetadataLookupStr (NULL, filterTable, filterName);
-                newName = psStringSubstitute (newName, ID, "{FILTER.ID}");
+                if (ID && *ID) {
+                    newName = psStringSubstitute (newName, ID, "{FILTER.ID}");
+                }
             }
         }
