From d4fe7ad3279c86b47892e942dae1dac6a2e51d85 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Mon, 9 Oct 2023 17:31:36 +0200 Subject: [PATCH] Bugfix Do not raise an exception when attempting to delete non-existing files. --- src/hictk/convert/cool_to_hic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hictk/convert/cool_to_hic.cpp b/src/hictk/convert/cool_to_hic.cpp index 54172fa7..8c53fe45 100644 --- a/src/hictk/convert/cool_to_hic.cpp +++ b/src/hictk/convert/cool_to_hic.cpp @@ -300,7 +300,8 @@ void cool_to_hic(const ConvertConfig& c) { const auto weights = tmpdir() / "weights.txt"; if (c.force && std::filesystem::exists(c.path_to_output)) { - std::filesystem::remove(c.path_to_output); + [[maybe_unused]] std::error_code ec{}; + std::filesystem::remove(c.path_to_output, ec); } std::unique_ptr process{};