remove failed info will be returned as error
code(CSR_ERROR_REMOVE_FAILED)
unlike other error cases, csr_cs_scan_file api allocates
detected handle when CSR_ERROR_REMOVE_FAILED returned
Change-Id: Ic4caf38b3a91da771813a83d4e3f4008a2251155
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
if (!file && !file->remove()) {
ERROR("Failed to remove filepath: " << filepath);
- return BinaryQueue::Serialize(CSR_ERROR_REMOVE_FAILED, CsDetected()).pop();
+ return BinaryQueue::Serialize(CSR_ERROR_REMOVE_FAILED, history).pop();
}
} catch (const FileDoNotExist &) {
WARN("File already removed... : " << filepath);
CSR_CS_SKIP = 0x03, /**< A user decided to skip a detected malicious content. */
CSR_CS_PROCESSING_ALLOWED = 0x04, /**< A user decided to process a detected malicious data. */
CSR_CS_PROCESSING_DISALLOWED = 0x05, /**< A user decided not to process a detected malicious data. */
- CSR_CS_REMOVE_FAILED = 0x99 /**< A user decided to remove but removal failed. */
} csr_cs_user_response_e;
/**
* @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
* @retval #CSR_ERROR_INVALID_PARAMETER file_path or presult is invalid
* @retval #CSR_ERROR_PERMISSION_DENIED Access denied
+ * @retval #CSR_ERROR_REMOVE_FAILED File remove failed when malware exist and
+ * user select to remove by popup. @a pdetected
+ * will be allocated on this error unlike others.
* @retval #CSR_ERROR_FILE_NOT_FOUND File not found
* @retval #CSR_ERROR_SOCKET Socket error between client and server
* @retval #CSR_ERROR_SERVER Server has been failed for some reason