shared: SandboxedProcessor: Return NO_ACCESS when file not readable

This commit is contained in:
Albert S. 2022-06-23 15:24:49 +02:00
父節點 01a6a499c5
當前提交 0867ab294d
共有 2 個檔案被更改,包括 5 行新增0 行删除

查看文件

@ -11,6 +11,7 @@ enum DataSource
};
#define NOTHING_PROCESSED 4
#define NO_ACCESS 5
class Processor
{

查看文件

@ -92,6 +92,10 @@ int SandboxedProcessor::process()
processor = defaultTextProcessor;
}
}
if(!fileInfo.isReadable())
{
return NO_ACCESS;
}
if(processor == nullptr || processor == nothingProcessor)
{
/* Nothing to do */