bool Bundle::isEncryptedResource(std::string Url, int &size)
{
- std::string filePath;
-
- size_t pos = Url.find_first_not_of(SCHEME_FILE);
- if (std::string::npos != pos) {
- filePath = Url.substr(pos - 1);
- }
-
if (m_encryptedFiles.empty()) {
WrtDB::WidgetDAOReadOnly(m_widgetTizenId).
getEncryptedFileList(m_encryptedFiles);
}
- WrtDB::EncryptedFileInfo info;
std::set<WrtDB::EncryptedFileInfo>::iterator it;
+ WrtDB::EncryptedFileInfo info;
+ std::string filePath;
+
+ if (0 != strncmp(Url.c_str(), SCHEME_FILE, strlen(SCHEME_FILE))) {
+ return false;
+ }
+
+ filePath = Url.substr(strlen(SCHEME_FILE));
info.fileName = DPL::FromUTF8String(filePath);
- if ((0 == strncmp(Url.c_str(), SCHEME_FILE, strlen(SCHEME_FILE))) &&
- (m_encryptedFiles.end() != (it =
- m_encryptedFiles.find(info))))
+ if (m_encryptedFiles.end() != (it = m_encryptedFiles.find(info)))
{
LogDebug(" info file name : " << it->fileName);
LogDebug(" info file size : " << it->fileSize);