Index: trunk/psModules/src/config/pmConfig.c
===================================================================
--- trunk/psModules/src/config/pmConfig.c	(revision 13207)
+++ trunk/psModules/src/config/pmConfig.c	(revision 13346)
@@ -4,6 +4,6 @@
  *  @author EAM (IfA)
  *
- *  @version $Revision: 1.92 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-05-04 00:46:42 $
+ *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-05-11 03:40:18 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1087,15 +1087,6 @@
         newName = tmpName;
 
-        // open the to create it if it doesn't exist.  This could cause a
-        // strange looking error if we can't access the file.
-        // XXX perhaps we should try access() first? -JH
-        int fd = open(newName, O_RDONLY|O_CREAT);
-        if (fd < 0) {
-            psError(PS_ERR_IO, true, "unable to open() file %s", newName);
-            psFree(newName);
-            return NULL;
-        }
-        if (close(fd) < 0) {
-            psError(PS_ERR_IO, true, "unable to open() file %s", newName);
+        if (!create && access(newName, R_OK) != 0) {
+            psError(PS_ERR_IO, true, "Unable to access file %s", newName);
             psFree(newName);
             return NULL;
@@ -1145,19 +1136,9 @@
         newName = tmpName;
 
-        // open the to create it if it doesn't exist.  This could cause a
-        // strange looking error if we can't access the file.
-        // XXX perhaps we should try access() first? -JH
-        int fd = open(newName, O_RDONLY|O_CREAT);
-        if (fd < 0) {
-            psError(PS_ERR_IO, true, "unable to open() file %s", newName);
+        if (!create && access(newName, R_OK) != 0) {
+            psError(PS_ERR_IO, true, "Unable to access file %s", newName);
             psFree(newName);
             return NULL;
         }
-        if (close(fd) < 0) {
-            psError(PS_ERR_IO, true, "unable to open() file %s", newName);
-            psFree(newName);
-            return NULL;
-        }
-
         return newName;
     }
