summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2011-10-25 22:27:56 +0000
committerChris Wilson <chris+github@qwirx.com>2011-10-25 22:27:56 +0000
commit3991c6075ba5b6eb74ac8ca7aab34aaae22336a5 (patch)
tree8127216a26441509f2f6f8038052f53ca4d37bea /bin
parentb63f27c0923a6758e5e5dbe2bc42e06a93049443 (diff)
Fix logging of real (non-VSS) paths in UploadFile*.
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp28
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.h1
2 files changed, 18 insertions, 11 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index 0e7fb92a..97dfd61c 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -258,8 +258,9 @@ void BackupClientDirectoryRecord::SyncDirectory(
DIR *dirHandle = 0;
try
{
- rNotifier.NotifyScanDirectory(this,
- ConvertVssPathToRealPath(rLocalPath, rBackupLocation));
+ std::string nonVssDirPath = ConvertVssPathToRealPath(rLocalPath,
+ rBackupLocation);
+ rNotifier.NotifyScanDirectory(this, nonVssDirPath);
dirHandle = ::opendir(rLocalPath.c_str());
if(dirHandle == 0)
@@ -269,19 +270,20 @@ void BackupClientDirectoryRecord::SyncDirectory(
if (errno == EACCES)
{
rNotifier.NotifyDirListFailed(this,
- ConvertVssPathToRealPath(rLocalPath, rBackupLocation),
+ nonVssDirPath,
"Access denied");
}
else
{
rNotifier.NotifyDirListFailed(this,
- ConvertVssPathToRealPath(rLocalPath, rBackupLocation),
+ nonVssDirPath,
strerror(errno));
}
// Report the error (logs and eventual email
// to administrator)
- SetErrorWhenReadingFilesystemObject(rParams, rLocalPath);
+ SetErrorWhenReadingFilesystemObject(rParams,
+ nonVssDirPath);
// Ignore this directory for now.
return;
}
@@ -1066,7 +1068,9 @@ bool BackupClientDirectoryRecord::UpdateItems(
try
{
latestObjectID = UploadFile(rParams,
- filename, storeFilename,
+ filename,
+ nonVssFilePath,
+ storeFilename,
fileSize, modTime,
attributesHash,
noPreviousVersionOnServer);
@@ -1608,6 +1612,7 @@ void BackupClientDirectoryRecord::RemoveDirectoryInPlaceOfFile(
int64_t BackupClientDirectoryRecord::UploadFile(
BackupClientDirectoryRecord::SyncParams &rParams,
const std::string &rFilename,
+ const std::string &rNonVssFilePath,
const BackupStoreFilename &rStoreFilename,
int64_t FileSize,
box_time_t ModificationTime,
@@ -1641,8 +1646,8 @@ int64_t BackupClientDirectoryRecord::UploadFile(
if(diffFromID != 0)
{
// Found an old version
- rNotifier.NotifyFileUploadingPatch(this,
- rFilename);
+ rNotifier.NotifyFileUploadingPatch(this,
+ rNonVssFilePath);
// Get the index
std::auto_ptr<IOStream> blockIndexStream(connection.ReceiveStream());
@@ -1701,7 +1706,7 @@ int64_t BackupClientDirectoryRecord::UploadFile(
if(doNormalUpload)
{
// below threshold or nothing to diff from, so upload whole
- rNotifier.NotifyFileUploading(this, rFilename);
+ rNotifier.NotifyFileUploading(this, rNonVssFilePath);
// Prepare to upload, getting a stream which will encode the file as we go along
std::auto_ptr<IOStream> upload(
@@ -1762,7 +1767,7 @@ int64_t BackupClientDirectoryRecord::UploadFile(
return 0;
}
rNotifier.NotifyFileUploadServerError(this,
- rFilename, type, subtype);
+ rNonVssFilePath, type, subtype);
}
}
@@ -1770,7 +1775,8 @@ int64_t BackupClientDirectoryRecord::UploadFile(
throw;
}
- rNotifier.NotifyFileUploaded(this, rFilename, FileSize, uploadedSize);
+ rNotifier.NotifyFileUploaded(this, rNonVssFilePath, FileSize,
+ uploadedSize);
// Return the new object ID of this file
return objID;
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.h b/bin/bbackupd/BackupClientDirectoryRecord.h
index a8ae7f36..8c7619d1 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.h
+++ b/bin/bbackupd/BackupClientDirectoryRecord.h
@@ -156,6 +156,7 @@ private:
const std::vector<std::string> &rDirs);
int64_t UploadFile(SyncParams &rParams,
const std::string &rFilename,
+ const std::string &rNonVssFilePath,
const BackupStoreFilename &rStoreFilename,
int64_t FileSize, box_time_t ModificationTime,
box_time_t AttributesHash, bool NoPreviousVersionOnServer);