Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-03 18:53:40 +0000
committerStijn Buys <ingar@osirion.org>2008-02-03 18:53:40 +0000
commit43b994017a560a2fa97894ebfe121375d6614b6f (patch)
treebebdf504c283a797707f92d46e7d3ed8b5100a9d /src/filesystem/file.cc
parent6011bbb179f72a370411960eafdbbc98e6607f05 (diff)
basic client console
Diffstat (limited to 'src/filesystem/file.cc')
-rw-r--r--src/filesystem/file.cc6
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;
}
}