From f6f99c41dbd86f85ce816ea8d388e44e04aed6cc Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 27 Oct 2012 16:34:13 +0530 Subject: modified: .bzrignore conversion/ConvertDirectory.java (bug-fix) It is checked whether file "index" is modified since the last conversion. This check was not performed before. conversion/ConvertFile.java Some optimization there. Now we check if the file content is "empty" before we delve into conversion. index/IndexCreator.java # "index" file is created in the directory, if it is not created. # write() renamed to shouldConvert(). The method now returns true when a link is added to 'index' or when the index.html file does not exists. io/ReadFile.java # Exception message for made verbose. todo --- conversion/ConvertDirectory.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'conversion/ConvertDirectory.java') diff --git a/conversion/ConvertDirectory.java b/conversion/ConvertDirectory.java index 3cc6a36..3b70a71 100644 --- a/conversion/ConvertDirectory.java +++ b/conversion/ConvertDirectory.java @@ -55,8 +55,9 @@ public class ConvertDirectory { } } - boolean modified = index.write(); - if(modified) + boolean convertIndex = (index.shouldConvert() || + canConvert.check(index.indexFile())); + if(convertIndex) html.convert(index.indexFile()); } } -- cgit v1.2.3