This commit is contained in:
Scott E. Graves 2024-11-07 14:08:08 -06:00
parent c14b637536
commit 793ec5b4a5

View File

@ -412,6 +412,7 @@ void open_file::remove_all() {
set_api_error(api_error::success);
mgr_.remove_upload(get_api_path());
mgr_.remove_resume(get_api_path(), get_source_path());
}
auto open_file::resize(std::uint64_t new_file_size) -> api_error {
@ -460,14 +461,16 @@ auto open_file::close() -> bool {
nf_->close();
if (modified_ && (get_api_error() == api_error::success)) {
mgr_.queue_upload(*this);
return true;
}
if (modified_) {
if (get_api_error() == api_error::success) {
mgr_.queue_upload(*this);
return true;
}
if (modified_ && (get_api_error() == api_error::download_incomplete)) {
mgr_.store_resume(*this);
return true;
if (get_api_error() == api_error::download_incomplete) {
mgr_.store_resume(*this);
return true;
}
}
if (get_api_error() == api_error::success) {