diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-03 18:53:40 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-03 18:53:40 +0000 |
commit | 43b994017a560a2fa97894ebfe121375d6614b6f (patch) | |
tree | bebdf504c283a797707f92d46e7d3ed8b5100a9d /src/filesystem/file.cc | |
parent | 6011bbb179f72a370411960eafdbbc98e6607f05 (diff) |
basic client console
Diffstat (limited to 'src/filesystem/file.cc')
-rw-r--r-- | src/filesystem/file.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc index cd6ae1b..1203d5a 100644 --- a/src/filesystem/file.cc +++ b/src/filesystem/file.cc @@ -17,6 +17,8 @@ File::~File() {} void File::open(const char * filename, ios_base::openmode mode) { file_name.assign(filename); std::string fn; + + real_name.clear(); // if moddir is set, try the mods subdir first if (moddir.size()) { @@ -26,6 +28,7 @@ void File::open(const char * filename, ios_base::openmode mode) { fn.append(filename); std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { + real_name = fn; con_debug << "File opened " << fn << std::endl; return; } @@ -36,6 +39,7 @@ void File::open(const char * filename, ios_base::openmode mode) { std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { con_debug << "File opened " << fn << std::endl; + real_name = fn; return; } } @@ -47,6 +51,7 @@ void File::open(const char * filename, ios_base::openmode mode) { std::ifstream::open(fn.c_str(), mode); if (this->is_open()) { con_debug << "File opened " << fn << std::endl; + real_name = fn; return; } @@ -60,6 +65,7 @@ void File::open(const char * filename, ios_base::openmode mode) { con_warn << "Could not open " << filename << std::endl; } else { con_debug << "File opened " << fn << std::endl; + real_name = fn; } } |