Skip to content

Commit

Permalink
removing tmp file in the proper place
Browse files Browse the repository at this point in the history
  • Loading branch information
jermp committed May 19, 2023
1 parent ee34eab commit 2636d62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions include/GGCAT.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ struct GGCAT {

~GGCAT() {
try {
/* remove all tmp file */
/* remove GGCAT's files */
std::remove((m_graph_file).c_str()); // ccdbg filename
std::remove((m_output_filename + ".fa").c_str()); // unitigs
std::remove((m_output_filename + ".ggcat.colors.dat").c_str()); // colors tmp filename
} catch (std::exception const& e) { std::cerr << e.what() << std::endl; }
}
Expand Down
3 changes: 3 additions & 0 deletions src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void index<ColorClasses>::build_from(ccdbg_builder const& builder) {
sshash_config.tmp_dirname = builder.config.tmp_dirname;
sshash_config.print();
m_k2u.build(builder.config.file_base_name + ".fa", sshash_config);
try { // remove unitig file
std::remove((builder.config.file_base_name + ".fa").c_str());
} catch (std::exception const& e) { std::cerr << e.what() << std::endl; }
}

{
Expand Down

0 comments on commit 2636d62

Please sign in to comment.