Skip to content
Commit a1b364ab authored by Igor Kushnir's avatar Igor Kushnir Committed by Milian Wolff
Browse files

Don't attempt to create /is_writing before clearing a repository

ItemRepositoryRegistryPrivate's constructor calls deleteDataDirectory()
while m_path is empty. deleteDataDirectory() in turn calls
lockForWriting(), which creates the file `m_path + "/is_writing"`. All
callers of deleteDataDirectory(), except for
ItemRepositoryRegistryPrivate's constructor, pass m_path to it. The
constructor delays initializing m_path for a reason that is no longer
relevant as it doesn't call any other functions that use m_path. So the
fix is to initialize m_path before the call to deleteDataDirectory() -
in the member initializer list.

Remove the redundant path parameter from deleteDataDirectory() because
all callers now pass a string equal to m_path as path.
parent 62301743
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment