Commit 0f5a3307 authored by Maria Fava's avatar Maria Fava
Browse files

fix typos v.2

parent c3fd46d2
......@@ -55,7 +55,7 @@ void ADDHCmd::commandReceived(ntof::dim::DIMCmd &cmdData)
command.timingEvent = timingEvent;
command.filePath = filePath;
std::string filePathPrefix = Config::instance().getvalue("outputDirPrefix", "ADDH/Prefix");
std::string filePathPrefix = Config::instance().getValue("outputDirPrefix", "ADDH/Prefix");
// Check if filePath is subpath of filePathPrefix
if(isValidPath(filePath, filePathPrefix))
......@@ -86,14 +86,14 @@ void ADDHCmd::commandReceived(ntof::dim::DIMCmd &cmdData)
bool ADDHCmd::isValidPath(std::string filePath, std::string filePathPrefix)
{
if(filePath[0] != "/")
if(filePath[0] != '/')
{
// filePath is relative, convert to absolute
char* absoluteFilePath = realpath(filePath, NULL);
char* absoluteFilePath = realpath(filePath.c_str(), NULL);
filePath = absoluteFilePath;
free(absoluteFilePath);
}
if(filePath.find(filePathPrefix) != std::string:npos)
if(filePath.find(filePathPrefix) != std::string::npos)
{
return true;
}
......
Supports Markdown
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