summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-05-08 13:09:19 +0200
committerPeter Wu <peter@lekensteyn.nl>2014-05-08 13:09:19 +0200
commit485cd738f404db14f4dc1066f98596e56879e26d (patch)
tree7502efe60e41f564edef93676a6eef10898615da
parent40e7a813aa8c0f5fd8a25496895aab1a56e450ea (diff)
downloadTwitterDataAnalytics-485cd738f404db14f4dc1066f98596e56879e26d.tar.gz
CompressableDataWriter: fix corruption for cfile
-rw-r--r--src/io/CompressableDataWriter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/io/CompressableDataWriter.java b/src/io/CompressableDataWriter.java
index 32531d1..d06c6cd 100644
--- a/src/io/CompressableDataWriter.java
+++ b/src/io/CompressableDataWriter.java
@@ -66,6 +66,10 @@ public class CompressableDataWriter extends DataWriter {
@Override
public void open() throws IOException {
+ if (os != null) {
+ // already open, don't bother.
+ return;
+ }
// throws FileNotFoundException if the dirs do not exist...
os = new FileOutputStream(getFileNameGz(), true);
try {