diff options
author | Stijn Buys <ingar@osirion.org> | 2009-02-08 15:27:59 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-02-08 15:27:59 +0000 |
commit | 2386bda56b33de68370fa8acc76e39ddddd836c6 (patch) | |
tree | 6de102324d33a70625c90c5839c17dcdc26ac47d /src/filesystem/filestream.cc | |
parent | c8a6ff1c0693ca1bd9025dcbdd7c22e3d193f8dd (diff) |
changed inifile and map to use filesystem::IFileStream
Diffstat (limited to 'src/filesystem/filestream.cc')
-rw-r--r-- | src/filesystem/filestream.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/filesystem/filestream.cc b/src/filesystem/filestream.cc index 693d1c1..cfbaaec 100644 --- a/src/filesystem/filestream.cc +++ b/src/filesystem/filestream.cc @@ -44,9 +44,12 @@ void IFileStream::open(const char *name) if (fstream_filename[i] == '/') fstream_filename[i] = '\\'; #endif */ - std::ifstream::open(fstream_filename.c_str()); - if (good()) - return; + + if (sys::file_exists(fstream_filename)) { + std::ifstream::open(fstream_filename.c_str()); + if (good()) + return; + } } fstream_filename.clear(); |