Index: trunk/Nebulous/nebclient/src/nebclient.c
===================================================================
--- trunk/Nebulous/nebclient/src/nebclient.c	(revision 4637)
+++ trunk/Nebulous/nebclient/src/nebclient.c	(revision 4639)
@@ -4,5 +4,5 @@
  * Copyright (C) 2005  Joshua Hoblitt
  *
- * $Id: nebclient.c,v 1.28 2005-07-28 02:55:20 jhoblitt Exp $
+ * $Id: nebclient.c,v 1.29 2005-07-28 04:13:32 jhoblitt Exp $
  */
 
@@ -311,7 +311,9 @@
     char            **locations;
     char            *filename;
+    int             instances;
     int             fh;
 
-    if (nebFindInstances(server, key, NULL, &locations) < 0) {
+    instances = nebFindInstances(server, key, NULL, &locations);
+    if (instances < 1) {
         nebSetErr(server, "no instances found");
 
@@ -326,4 +328,10 @@
 
     if (flag == NEB_WRITE) {
+        if (instances > 1) {
+            nebSetErr(server, "write not allowed with multiple instances");
+            nebFree(filename);
+
+            return -1;
+        }
         fh = open(filename, O_RDWR);
     } else {
