summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/toy.groovy6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/toy.groovy b/scripts/toy.groovy
index ce64ba6..e038a08 100644
--- a/scripts/toy.groovy
+++ b/scripts/toy.groovy
@@ -49,10 +49,12 @@ final IMAGEDATA = {
domme: d.getName(),
sets: d.listFiles()
.findAll { s -> s.isDirectory(); }
+ .collect { s -> [ sub: s, f: new File(s.getPath() + "/tags")] }
+ .findAll { s -> s.f.canRead() }
.collect { s ->
[
- set: s.getName(),
- images: new File(s.getPath() + "/tags")
+ set: s.sub.getName(),
+ images: s.f
.readLines()
.collect { l ->
def fields = l.split(":");