Skip to content

Commit

Permalink
Remove useless check in touch() task
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Dec 18, 2024
1 parent 3d1225f commit fbc5772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1563,11 +1563,7 @@ void ADIOS2IOHandlerImpl::deregister(
void ADIOS2IOHandlerImpl::touch(
Writable *writable, Parameter<Operation::TOUCH> const &)
{
if (!writable->fileState || !writable->fileState->has_value())
{
throw error::Internal(
"ADIOS2 backend: Tried accessing a file that is not open.");
}
refreshFileFromParent(writable, false);
if (access::write(m_handler->m_backendAccess))
{
this->m_dirty.emplace(writable->fileState);
Expand Down
6 changes: 1 addition & 5 deletions src/IO/JSON/JSONIOHandlerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1732,11 +1732,7 @@ void JSONIOHandlerImpl::deregister(
void JSONIOHandlerImpl::touch(
Writable *writable, Parameter<Operation::TOUCH> const &)
{
if (!writable->fileState || !writable->fileState->has_value())
{
throw error::Internal(
"JSON/TOML backend: Tried accessing a file that is not open.");
}
refreshFileFromParent(writable, false);
if (access::write(m_handler->m_backendAccess))
{
this->m_dirty.emplace(writable->fileState);
Expand Down

0 comments on commit fbc5772

Please sign in to comment.