if (manifest_version.empty())
return kManifestVersion;
- for (const char& c : manifest_version) {
- // first bit of 1 byte utf-8 character is always 0
- if (c >> 7 == 1)
- continue;
-
- if (std::string(1, c).find_first_not_of("1234567890.") !=
- std::string::npos) {
- LOG(ERROR) << "Invalid version format";
- return nullptr;
- }
- }
return manifest_version;
}
const std::string& version = wgt_info->version();
manifest->ns = strdup(kTizenPackageXmlNamespace);
- std::string version_tmp = GetPackageVersion(version);
- if (version_tmp.empty()) {
- LOG(ERROR) << "Invalid version format : " << version;
- return false;
- }
- manifest->version = strdup(version_tmp.c_str());
+ manifest->version = strdup(GetPackageVersion(version).c_str());
for (auto& item : wgt_info->description_set()) {
description_x* description = reinterpret_cast<description_x*>