summaryrefslogtreecommitdiff
path: root/lib/shadow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shadow.cpp')
-rw-r--r--lib/shadow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/shadow.cpp b/lib/shadow.cpp
index 52b40a9e..d3106168 100644
--- a/lib/shadow.cpp
+++ b/lib/shadow.cpp
@@ -86,7 +86,7 @@ private:
//#############################################################################################################
-Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile)
+Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile, const std::function<void(const Zstring&)>& onBeforeMakeVolumeCopy)
{
DWORD bufferSize = 10000;
std::vector<wchar_t> volBuffer(bufferSize);
@@ -111,6 +111,7 @@ Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile)
VolNameShadowMap::const_iterator it = shadowVol.find(volumeNamePf);
if (it == shadowVol.end())
{
+ onBeforeMakeVolumeCopy(volumeNamePf); //notify client before (potentially) blocking some time
auto newEntry = std::make_shared<ShadowVolume>(volumeNamePf); //throw FileError
it = shadowVol.insert(std::make_pair(volumeNamePf, newEntry)).first;
}
bgstack15