Commit a1b364ab authored by Committed by Milian WolffBrowse 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.