Skip to content

Commit c0cd753

Browse files
Align extension
1 parent 71eb31d commit c0cd753

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

include/core/Version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <string>
55

66
namespace core {
7-
const std::string PRMERS_VERSION = "4.15.73-alpha";
7+
const std::string PRMERS_VERSION = "4.15.74-alpha";
88
} // namespace core
99

1010
#endif // VERSION_HPP

src/modes/RunPM1.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3405,6 +3405,19 @@ int App::runPM1Stage3Marin() {
34053405
wm.appendToResultsTxt(json);
34063406

34073407
delete eng;
3408+
if (hasWorktodoEntry_) {
3409+
if (worktodoParser_->removeFirstProcessed()) {
3410+
std::cout << "Entry removed from " << options.worktodo_path << " and saved to worktodo_save.txt\n";
3411+
if (guiServer_) { std::ostringstream oss; oss << "Entry removed from " << options.worktodo_path << " and saved to worktodo_save.txt\n"; guiServer_->appendLog(oss.str()); }
3412+
std::ifstream f(options.worktodo_path);
3413+
std::string l; bool more = false; while (std::getline(f, l)) { if (!l.empty() && l[0] != '#') { more = true; break; } }
3414+
f.close();
3415+
if (more) { std::cout << "Restarting for next entry in worktodo.txt\n"; if (guiServer_) { std::ostringstream oss; oss << "Restarting for next entry in worktodo.txt\n"; guiServer_->appendLog(oss.str()); } restart_self(argc_, argv_); }
3416+
else { std::cout << "No more entries in worktodo.txt, exiting.\n"; if (guiServer_) { std::ostringstream oss; oss << "No more entries in worktodo.txt, exiting.\n"; guiServer_->appendLog(oss.str()); } if (!options.gui) {std::exit(0);} }
3417+
} else {
3418+
std::cerr << "Failed to update " << options.worktodo_path << "\n"; if (guiServer_) { std::ostringstream oss; oss << "Failed to update " << options.worktodo_path << "\n"; guiServer_->appendLog(oss.str()); } if (!options.gui) {std::exit(-1);}
3419+
}
3420+
}
34083421
return found ? 0 : 1;
34093422
}
34103423

0 commit comments

Comments
 (0)