summaryrefslogtreecommitdiff
path: root/Source/Library/Common/FileStream.class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Library/Common/FileStream.class.cpp')
-rw-r--r--Source/Library/Common/FileStream.class.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Library/Common/FileStream.class.cpp b/Source/Library/Common/FileStream.class.cpp
index 6154b2f..322e9aa 100644
--- a/Source/Library/Common/FileStream.class.cpp
+++ b/Source/Library/Common/FileStream.class.cpp
@@ -4,11 +4,16 @@
// INPUT FILE STREAM
// ********************
-FileIStream::FileIStream(const String &filename, u8int encoding, FSNode start) {
+FileIStream::FileIStream(const String &filename, u8int encoding, FSNode start) : m_start(start) {
m_file = new File(filename, FM_READ, start);
m_encoding = encoding;
}
+FileIStream::FileIStream(u8int encoding, FSNode start) : m_start(start) {
+ m_file = 0;
+ m_encoding = encoding;
+}
+
FileIStream::~FileIStream() {
if (m_file != 0) {
m_file->close();
@@ -33,11 +38,7 @@ String FileIStream::read() {
if (m_filenames == 0) {
return "";
} else {
-#ifdef THIS_IS_MELON_KERNEL
- m_file = new File(m_filenames->v(), FM_READ);
-#else
- m_file = new File(m_filenames->v(), FM_READ, FS::cwdNode());
-#endif
+ m_file = new File(m_filenames->v(), FM_READ, m_start);
m_filenames = m_filenames->delThis();
}
}