summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2012-12-23 22:23:57 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2012-12-23 22:23:57 +0530
commit3d489cce70a2033463f41f83988dc2b748f0d2f0 (patch)
treeefc20395d8fdba96d5bdbc5b092c18fe47937d4a
parentf56bc423c3911eff6a21f18aaba64ea25491620e (diff)
[bug-fix]: The StyleChecker object was not used correctly in conversion/ConvertDirectory.java, this has been rectified.
modified: conversion/ConvertDirectory.java
-rw-r--r--conversion/ConvertDirectory.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/conversion/ConvertDirectory.java b/conversion/ConvertDirectory.java
index 87a0145..5a8cb17 100644
--- a/conversion/ConvertDirectory.java
+++ b/conversion/ConvertDirectory.java
@@ -32,7 +32,6 @@ public class ConvertDirectory {
private CanConvert canConvert;
private boolean can;
private StyleChecker styleSheet;
- private boolean styleFlag;
public ConvertDirectory() {
html = new ConvertFile();
canConvert = new CanConvert();
@@ -51,8 +50,6 @@ public class ConvertDirectory {
IndexCreator index = new IndexCreator(directory);
// iterate through the directory.
System.out.println("Current Directory: "+directory.getAbsolutePath());
- // reset styleFlag.
- styleFlag = false;
for(File file:directory.listFiles(new FileSieve())) {
if(file.isFile()) {
can = canConvert.check(file);
@@ -60,8 +57,9 @@ public class ConvertDirectory {
System.out.println("Converting..."+file.getAbsolutePath());
html.convert(file);
index.add(file);
- // set styleFlag.
- styleFlag = true;
+ // check for style sheet in the directory; create/update
+ // if needed.
+ styleSheet.check(directory);
}
}
else if(file.isDirectory()) {
@@ -73,11 +71,6 @@ public class ConvertDirectory {
}
}
}
- // if styleFlag is set, check for style sheet in
- // in the directory.
- if(styleFlag) {
- styleSheet.check(directory);
- }
boolean convertIndex = (index.shouldConvert() ||
canConvert.check(index.indexFile()));
if(convertIndex) {