diff --git a/shared/sandboxedprocessor.cpp b/shared/sandboxedprocessor.cpp index e3168bc..a92aa75 100644 --- a/shared/sandboxedprocessor.cpp +++ b/shared/sandboxedprocessor.cpp @@ -35,9 +35,10 @@ void SandboxedProcessor::enableSandbox(QString readablePath) } policy->namespace_options = EXILE_UNSHARE_NETWORK | EXILE_UNSHARE_USER; + std::string readablePathLocation; if(!readablePath.isEmpty()) { - std::string readablePathLocation = readablePath.toStdString(); + readablePathLocation = readablePath.toStdString(); if(exile_append_path_policies(policy, EXILE_FS_ALLOW_ALL_READ, readablePathLocation.c_str()) != 0) { qCritical() << "Failed to add path policies";