From 1f61844084d9e9383b3be04ff8f60c11eb628075 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Wed, 31 Oct 2012 22:00:35 +0530 Subject: modified: conversion/ConvertDirectory.java (minor edit) index/IndexCreator.java (removed code which (1) creates a index file, if it is not present (2) checks for the existence of index.html) io/WriteFile.java (made the stdout message more verbose) parsers/Header.java ('scruf' footer links to scruf's project page) todo (1 task completed) --- index/IndexCreator.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'index') diff --git a/index/IndexCreator.java b/index/IndexCreator.java index f86f03a..ef683f7 100644 --- a/index/IndexCreator.java +++ b/index/IndexCreator.java @@ -39,13 +39,6 @@ public class IndexCreator { if(index.exists()) { indexContent.append(new ReadFile(index). getContent()); - }else { - try { - index.createNewFile(); - }catch(IOException e) { - throw new RuntimeException("Unable to create file: "+ - index.getAbsolutePath(),e); - } } } public void add(File file) { @@ -61,19 +54,9 @@ public class IndexCreator { } } public boolean shouldConvert() { - // we assume that index.html exists. - boolean indexHTMLExists=true; if(modified) new WriteFile(index,indexContent.toString()).write(); - // Check for this existence of index.html. - if(!(new File(directory,"index.html").exists())) { - indexHTMLExists=false; - } - /** - * returns true either when 'index' is modified or - * when index.html does not exists. - */ - return (modified || !indexHTMLExists); + return (modified); } public File indexFile() { return index; -- cgit v1.2.3