After moving start file localization to
WebProcess function receives URI ended with
'/' what causes localization failures.
[Issue#] N/A
[Problem] Unexpected '/' at the end of URIs
[Cause] N/A
[Solution] Additional check and character
removal (if needed)
[Verification] Build & install package.
Run widget and check if URIs are localized
properly.
Change-Id: I925dd1a10d83ba1d8d42d7bd84096e77f435a798
if (filePath.size() == 0) { return DPL::Optional<std::string>::Null; }
//Removing preceding '/'
if (filePath[0] == '/') { filePath.erase(0, 1); }
+ // In some cases (start file localization) url has unnecessary "/" at the end
+ if(filePath[filePath.size()-1] == '/') { filePath.erase(filePath.size()-1, 1); }
//Check if string isn't empty
if (filePath.size() == 0) { return DPL::Optional<std::string>::Null; }