Commit c6f4b352 authored by Phoebe Buckheister's avatar Phoebe Buckheister 🦎

meta: fix mirrored/unmirrored flip in non-inlined fileinode file load

this could lead to files not being loaded when all of these conditions
are met:

 * metadata is not stored in xattrs
 * a file is deleted
 * the metadata server is restarted afterwardso

the meta server would then be unable to restore the session for the
deleted file, rendering it inaccessible.

(cherry picked from commit 505eee2745731f76401ea0c08a6e1dc0df34944e)
parent d73b8d8e
......@@ -705,7 +705,7 @@ bool FileInode::loadFromFileContents(const std::string& id, bool isBuddyMirrored
const char* logContext = "File inode (load from file)";
App* app = Program::getApp();
const Path* inodePath = isBuddyMirrored ? app->getInodesPath() : app->getBuddyMirrorInodesPath();
const Path* inodePath = isBuddyMirrored ? app->getBuddyMirrorInodesPath() : app->getInodesPath();
std::string metaFilename = MetaStorageTk::getMetaInodePath(inodePath->str(), id);
bool retVal = false;
......
Markdown is supported
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