path = unmarshallString(o, "name");
lastModified = unmarshallDate(o, "last_modified");
}
- //Strip the last / if exists in order to determine the name, but remember to put it back
- boolean endsWithSlash = false;
if (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
- endsWithSlash = true;
}
if (path.contains("/"))
name = path.substring(path.lastIndexOf("/") + 1, path.length()); //strip the prefix
else
name = path;
- if (endsWithSlash) {
- path += "/";
- name += "/";
- }
if (aContainer != null) {
container = aContainer;
prefix = path;