From 8062dd66349524f1dfcdbc0ec0c5d585b1ce4b66 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 30 Dec 2012 13:54:16 +0530 Subject: [fix] stylesheet is updated, in all scruf aware directories, if the default scruf's stylesheet is updated. modified: conversion/ConvertDirectory.java --- conversion/ConvertDirectory.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'conversion') 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; } -- cgit v1.2.3