Revision 1d6f8288 src/gr/grnet/pithos/web/client/foldertree/Folder.java
b/src/gr/grnet/pithos/web/client/foldertree/Folder.java | ||
---|---|---|
122 | 122 |
return prefix; |
123 | 123 |
} |
124 | 124 |
|
125 |
public void setPrefix(String prefix) { |
|
126 |
this.prefix = prefix; |
|
127 |
} |
|
128 |
|
|
129 | 125 |
private void parsePermissions(String rawPermissions) { |
130 | 126 |
String[] readwrite = rawPermissions.split(";"); |
131 | 127 |
for (String s : readwrite) { |
... | ... | |
205 | 201 |
path = unmarshallString(o, "name"); |
206 | 202 |
lastModified = unmarshallDate(o, "last_modified"); |
207 | 203 |
} |
208 |
if (path.endsWith("/")) |
|
204 |
boolean endsWithSlash = false; |
|
205 |
if (path.endsWith("/")) { |
|
209 | 206 |
path = path.substring(0, path.length() - 1); |
207 |
endsWithSlash = true; |
|
208 |
} |
|
210 | 209 |
if (path.contains("/")) |
211 | 210 |
name = path.substring(path.lastIndexOf("/") + 1, path.length()); //strip the prefix |
212 | 211 |
else |
213 | 212 |
name = path; |
213 |
if (endsWithSlash) |
|
214 |
name += "/"; |
|
214 | 215 |
if (aContainer != null) { |
215 | 216 |
container = aContainer; |
216 | 217 |
prefix = path; |
Also available in: Unified diff