diff options
Diffstat (limited to 'conversion')
-rw-r--r-- | conversion/ConvertDirectory.java | 9 |
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; } |