Index: trunk/ippTools/src/pztool.c
===================================================================
--- trunk/ippTools/src/pztool.c	(revision 17401)
+++ trunk/ippTools/src/pztool.c	(revision 17550)
@@ -42,5 +42,5 @@
 static bool revertcopiedMode(pxConfig *config);
 
-static bool copydoneCompleteExp(pxConfig *config);
+static bool copydoneCompleteExp(pxConfig *config, const char *exp_name, const char *camera, const char *telescope);
 static psArray *pzGetPendingCameras(pxConfig *config);
 static psArray *pzArrayZip(psArray *arraySet, psS64 limit);
@@ -409,5 +409,5 @@
     }
 
-    if (!copydoneCompleteExp(config)) {
+    if (!copydoneCompleteExp(config, exp_name, camera, telescope)) {
         // rollback
         if (!psDBRollback(config->dbh)) {
@@ -431,5 +431,5 @@
 }
 
-static bool copydoneCompleteExp(pxConfig *config)
+static bool copydoneCompleteExp(pxConfig *config, const char *exp_name, const char *camera, const char *telescope)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -455,4 +455,7 @@
         return false;
     }
+
+    psStringAppend(&query, "WHERE exp_name = '%s' AND telescope = '%s' AND camera = '%s'",
+                          exp_name, telescope, camera);
 
     if (!p_psDBRunQuery(config->dbh, query)) {
