Skip to content

Commit 6d61ce6

Browse files
committed
Remove useless check in touch() task
1 parent cc06978 commit 6d61ce6

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,11 +1817,7 @@ void ADIOS2IOHandlerImpl::deregister(
18171817
void ADIOS2IOHandlerImpl::touch(
18181818
Writable *writable, Parameter<Operation::TOUCH> const &)
18191819
{
1820-
if (!writable->fileState || !writable->fileState->has_value())
1821-
{
1822-
throw error::Internal(
1823-
"ADIOS2 backend: Tried accessing a file that is not open.");
1824-
}
1820+
refreshFileFromParent(writable, false);
18251821
if (access::write(m_handler->m_backendAccess))
18261822
{
18271823
this->m_dirty.emplace(writable->fileState);

src/IO/JSON/JSONIOHandlerImpl.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,11 +1730,7 @@ void JSONIOHandlerImpl::deregister(
17301730
void JSONIOHandlerImpl::touch(
17311731
Writable *writable, Parameter<Operation::TOUCH> const &)
17321732
{
1733-
if (!writable->fileState || !writable->fileState->has_value())
1734-
{
1735-
throw error::Internal(
1736-
"JSON/TOML backend: Tried accessing a file that is not open.");
1737-
}
1733+
refreshFileFromParent(writable, false);
17381734
if (access::write(m_handler->m_backendAccess))
17391735
{
17401736
this->m_dirty.emplace(writable->fileState);

0 commit comments

Comments
 (0)