summaryrefslogtreecommitdiff
path: root/src/filebuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/filebuffer.java')
-rw-r--r--src/filebuffer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filebuffer.java b/src/filebuffer.java
index 4015b55..833f695 100644
--- a/src/filebuffer.java
+++ b/src/filebuffer.java
@@ -14,8 +14,10 @@ public class filebuffer {
public filebuffer(String fn, boolean hn) {
buffer = new ArrayList<String>(); // Arraylist that stores every line of a file in strings
hasName = hn;
- fileName = fn;
- readFile();
+ if (hn) {
+ fileName = fn;
+ readFile();
+ }
}
/* getFileSize: gets the size of the buffer arraylist */