From 317325aeb8b887bba4f7d71e0768a28412feaba0 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 11 Dec 2024 14:56:36 -0600 Subject: [PATCH] fix --- repertory/librepertory/src/file_manager/open_file.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repertory/librepertory/src/file_manager/open_file.cpp b/repertory/librepertory/src/file_manager/open_file.cpp index 93801587..a7a41661 100644 --- a/repertory/librepertory/src/file_manager/open_file.cpp +++ b/repertory/librepertory/src/file_manager/open_file.cpp @@ -474,11 +474,14 @@ auto open_file::close() -> bool { } } + if (err != api_error::success || read_state_.all()) { + mgr_.remove_resume(get_api_path(), get_source_path()); + } + if (err == api_error::success) { return true; } - mgr_.remove_resume(get_api_path(), get_source_path()); if (not utils::file::file(fsi_.source_path).remove()) { utils::error::raise_api_path_error( function_name, get_api_path(), fsi_.source_path,