summaryrefslogtreecommitdiff
path: root/lib/backupclient/BackupStoreFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backupclient/BackupStoreFile.cpp')
-rw-r--r--lib/backupclient/BackupStoreFile.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/backupclient/BackupStoreFile.cpp b/lib/backupclient/BackupStoreFile.cpp
index 7e93d59d..27e12bc8 100644
--- a/lib/backupclient/BackupStoreFile.cpp
+++ b/lib/backupclient/BackupStoreFile.cpp
@@ -65,22 +65,27 @@ BackupStoreFileStats BackupStoreFile::msStats = {0,0,0};
// Function
// Name: BackupStoreFile::EncodeFile(IOStream &, IOStream &)
// Purpose: Encode a file into something for storing on file server.
-// Requires a real filename so full info can be stored.
+// Requires a real filename so full info can be stored.
//
-// Returns a stream. Most of the work is done by the stream
-// when data is actually requested -- the file will be held
-// open until the stream is deleted or the file finished.
+// Returns a stream. Most of the work is done by the stream
+// when data is actually requested -- the file will be held
+// open until the stream is deleted or the file finished.
// Created: 2003/08/28
//
// --------------------------------------------------------------------------
-std::auto_ptr<IOStream> BackupStoreFile::EncodeFile(const char *Filename, int64_t ContainerID, const BackupStoreFilename &rStoreFilename, int64_t *pModificationTime)
+std::auto_ptr<IOStream> BackupStoreFile::EncodeFile(const char *Filename,
+ int64_t ContainerID, const BackupStoreFilename &rStoreFilename,
+ int64_t *pModificationTime, ReadLoggingStream::Logger* pLogger,
+ RunStatusProvider* pRunStatusProvider)
{
// Create the stream
std::auto_ptr<IOStream> stream(new BackupStoreFileEncodeStream);
// Do the initial setup
- ((BackupStoreFileEncodeStream*)stream.get())->Setup(Filename, 0 /* no recipe, just encode */,
- ContainerID, rStoreFilename, pModificationTime);
+ ((BackupStoreFileEncodeStream*)stream.get())->Setup(Filename,
+ 0 /* no recipe, just encode */,
+ ContainerID, rStoreFilename, pModificationTime, pLogger,
+ pRunStatusProvider);
// Return the stream for the caller
return stream;
@@ -267,8 +272,8 @@ bool BackupStoreFile::VerifyEncodedFileFormat(IOStream &rFile, int64_t *pDiffFro
void BackupStoreFile::DecodeFile(IOStream &rEncodedFile, const char *DecodedFilename, int Timeout, const BackupClientFileAttributes *pAlterativeAttr)
{
// Does file exist?
- struct stat st;
- if(::stat(DecodedFilename, &st) == 0)
+ EMU_STRUCT_STAT st;
+ if(EMU_STAT(DecodedFilename, &st) == 0)
{
THROW_EXCEPTION(BackupStoreException, OutputFileAlreadyExists)
}
@@ -1255,8 +1260,8 @@ bool BackupStoreFile::CompareFileContentsAgainstBlockIndex(const char *Filename,
// is it a symlink?
bool sourceIsSymlink = false;
{
- struct stat st;
- if(::lstat(Filename, &st) == -1)
+ EMU_STRUCT_STAT st;
+ if(EMU_LSTAT(Filename, &st) == -1)
{
THROW_EXCEPTION(CommonException, OSFileError)
}