String path = resourceKey.substring(ix + 1);
path = Strings.replaceAll(path, escapeString, "..").toString();
if (PackageResource.exists(scope, path, null, null))
{
PackageResource packageResource = PackageResource.get(scope, path);
if (sharedResources.get(resourceKey) == null)
{
sharedResources.add(scope, path, null, null, packageResource);
}
resource = packageResource;