Imported Upstream version 2.4.5
[debian/amanda] / server-src / amflush.c
index 73ff0308cf9257d2d93d5ba89c5aaa4d34210620..f6a5df5d79315905ccc0d9fa73aec2481e9df0ea 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: amflush.c,v 1.41.2.13.4.6.2.10 2004/04/23 11:44:57 martinea Exp $
+ * $Id: amflush.c,v 1.41.2.13.4.6.2.9.2.2 2004/10/20 21:49:26 martinea Exp $
  *
  * write files from work directory onto tape
  */
@@ -226,6 +226,12 @@ char **main_argv;
        exit(1);
     }
 
+    holding_list = get_flush(datestamp_list, NULL, 1, 0);
+    if(holding_list->first == NULL) {
+       printf("Could not find any valid dump image, check directory.\n");
+       exit(1);
+    }
+
     if(!batch) confirm();
 
     for(dp = diskqp->head; dp != NULL; dp = dp->next) {
@@ -269,7 +275,6 @@ char **main_argv;
     }
     driver_stream = fdopen(driver_pipe[1], "w");
 
-    holding_list = get_flush(datestamp_list, NULL, 1, 0);
     for(holding_file=holding_list->first; holding_file != NULL;
                                   holding_file = holding_file->next) {
        get_dumpfile(holding_file->name, &file);