diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceUtil/OutputUtil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/IceUtil/OutputUtil.cpp b/cpp/src/IceUtil/OutputUtil.cpp index 9b8612c4d7b..5a398c84ce6 100644 --- a/cpp/src/IceUtil/OutputUtil.cpp +++ b/cpp/src/IceUtil/OutputUtil.cpp @@ -90,6 +90,15 @@ IceUtilInternal::OutputBase::~OutputBase() void IceUtilInternal::OutputBase::open(const char* s) { + // + // Remove any existing file first. This prevents file name + // mismatches on case-insensitive OSs. + // +#ifdef _WIN32 + _unlink(s); +#else + unlink(s); +#endif _fout.open(s); } |