aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2012-12-30 13:54:16 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2012-12-30 13:54:16 +0530
commit8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66 (patch)
treea5156fa9ac3d90d8787b3418981019b8ce90e60f
parent7392c5e1f4d08081a1bc739e24d80ae745c93c03 (diff)
downloadscruf-8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66.tar.gz
scruf-8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66.tar.bz2
scruf-8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66.tar.xz
scruf-8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66.zip
[fix] stylesheet is updated, in all scruf aware directories, if the default scruf's stylesheet is updated.
modified: conversion/ConvertDirectory.java
-rw-r--r--conversion/ConvertDirectory.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/conversion/ConvertDirectory.java b/conversion/ConvertDirectory.java
index 5a8cb17..9b002fe 100644
--- a/conversion/ConvertDirectory.java
+++ b/conversion/ConvertDirectory.java
@@ -50,6 +50,7 @@ public class ConvertDirectory {
IndexCreator index = new IndexCreator(directory);
// iterate through the directory.
System.out.println("Current Directory: "+directory.getAbsolutePath());
+ // the FileSieve parse for .scruffy files (except index.scruffy):
for(File file:directory.listFiles(new FileSieve())) {
if(file.isFile()) {
can = canConvert.check(file);
@@ -57,9 +58,6 @@ public class ConvertDirectory {
System.out.println("Converting..."+file.getAbsolutePath());
html.convert(file);
index.add(file);
- // check for style sheet in the directory; create/update
- // if needed.
- styleSheet.check(directory);
}
}
else if(file.isDirectory()) {
@@ -77,6 +75,11 @@ public class ConvertDirectory {
System.out.println("Converting..."+index.indexFile().getAbsolutePath());
html.convert(index.indexFile());
}
+ // check whether this directory has scruffy files:
+ if(index.indexFile().exists()) {
+ // create/update stylesheet if need.
+ styleSheet.check(directory);
+ }
--DirectoryInfo.level;
}