Revision fb55a1b3 src/gr/grnet/pithos/web/client/foldertree/Folder.java
b/src/gr/grnet/pithos/web/client/foldertree/Folder.java | ||
---|---|---|
202 | 202 |
path = unmarshallString(o, "name"); |
203 | 203 |
lastModified = unmarshallDate(o, "last_modified"); |
204 | 204 |
} |
205 |
//Strip the last / if exists in order to determine the name, but remember to put it back |
|
206 |
boolean endsWithSlash = false; |
|
207 | 205 |
if (path.endsWith("/")) { |
208 | 206 |
path = path.substring(0, path.length() - 1); |
209 |
endsWithSlash = true; |
|
210 | 207 |
} |
211 | 208 |
if (path.contains("/")) |
212 | 209 |
name = path.substring(path.lastIndexOf("/") + 1, path.length()); //strip the prefix |
213 | 210 |
else |
214 | 211 |
name = path; |
215 |
if (endsWithSlash) { |
|
216 |
path += "/"; |
|
217 |
name += "/"; |
|
218 |
} |
|
219 | 212 |
if (aContainer != null) { |
220 | 213 |
container = aContainer; |
221 | 214 |
prefix = path; |
Also available in: Unified diff