Revision 967d4483
b/web_client/src/gr/grnet/pithos/web/client/foldertree/Folder.java | ||
---|---|---|
147 | 147 |
f.populate(this, o, container); |
148 | 148 |
subfolders.add(f); |
149 | 149 |
} |
150 |
else { |
|
150 |
else if (!(o.containsKey("x_object_meta_trash") && o.get("x_object_meta_trash").isString().stringValue().equals("true"))) {
|
|
151 | 151 |
File file = new File(); |
152 | 152 |
file.populate(this, o, container); |
153 | 153 |
files.add(file); |
154 | 154 |
} |
155 | 155 |
} |
156 | 156 |
} |
157 |
//This step is necessary to remove the trashed folders. Trashed folders are added initially because we need to |
|
158 |
//avoid having in the list the virtual folders of the form {"subdir":"folder1"} which have no indication of thrash |
|
157 | 159 |
Iterator<Folder> iter = subfolders.iterator(); |
158 | 160 |
while (iter.hasNext()) { |
159 | 161 |
Folder f = iter.next(); |
160 | 162 |
if (f.isInTrash()) |
161 | 163 |
iter.remove(); |
162 | 164 |
} |
163 |
Iterator<File> it = files.iterator(); |
|
164 |
while (it.hasNext()) { |
|
165 |
File f = it.next(); |
|
166 |
if (f.isInTrash()) |
|
167 |
it.remove(); |
|
168 |
} |
|
169 | 165 |
} |
170 | 166 |
} |
171 | 167 |
|
Also available in: Unified diff