summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/FileCache.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-11-10 05:30:26 +0100
committerJose <jose@zeroc.com>2009-11-10 05:30:26 +0100
commit4247c9e2c2612394a5f4d63a65ba538f975906d4 (patch)
tree96d3308681d9b0684ce5dd763f5a5d415eaf09d7 /cpp/src/IceGrid/FileCache.cpp
parentWin32 64 bits compilation error (diff)
downloadice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.bz2
ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.tar.xz
ice-4247c9e2c2612394a5f4d63a65ba538f975906d4.zip
Fixed 3962 - Berkeley DB, problems with unicode paths.
Diffstat (limited to 'cpp/src/IceGrid/FileCache.cpp')
-rw-r--r--cpp/src/IceGrid/FileCache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp
index ba232fe0289..2a813daf2d7 100644
--- a/cpp/src/IceGrid/FileCache.cpp
+++ b/cpp/src/IceGrid/FileCache.cpp
@@ -10,11 +10,12 @@
#include <Ice/Communicator.h>
#include <Ice/Properties.h>
+#include <IceUtil/FileUtil.h>
+
#include <IceGrid/FileCache.h>
#include <IceGrid/Exception.h>
#include <deque>
-#include <fstream>
using namespace std;
using namespace IceGrid;
@@ -27,7 +28,7 @@ FileCache::FileCache(const Ice::CommunicatorPtr& com) :
Ice::Long
FileCache::getOffsetFromEnd(const string& file, int originalCount)
{
- ifstream is(file.c_str());
+ IceUtilInternal::ifstream is(file); // file is a UTF-8 string
if(is.fail())
{
throw FileNotAvailableException("failed to open file `" + file + "'");
@@ -139,7 +140,7 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf
throw FileNotAvailableException("maximum bytes per read request is too low");
}
- ifstream is(file.c_str());
+ IceUtilInternal::ifstream is(file); // file is a UTF-8 string
if(is.fail())
{
throw FileNotAvailableException("failed to open file `" + file + "'");