Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /pp/opreport_options.cpp [6bc578] .. [6893b5] Maximize Restore

  Switch to side-by-side view

--- a/pp/opreport_options.cpp
+++ b/pp/opreport_options.cpp
@@ -25,6 +25,7 @@
 #include "xml_output.h"
 #include "xml_utils.h"
 #include "cverb.h"
+#include "op_exception.h"
 
 using namespace std;
 
@@ -253,8 +254,17 @@
 		profile_spec::create(spec, options::image_path,
 				     options::root_path);
 
-	list<string> sample_files = pspec.generate_file_list(exclude_dependent,
-	                                                     !options::callgraph);
+	list<string> sample_files;
+again:
+	try {
+		sample_files = pspec.generate_file_list(exclude_dependent,
+		                                        !options::callgraph);
+	} catch (op_no_samples_exception e) {
+		if (try_another_session_dir())
+			goto again;
+		else
+			throw op_fatal_error(e.what());
+	}
 
 	cverb << vsfile << "Archive: " << pspec.get_archive_path() << endl;