summaryrefslogtreecommitdiff
path: root/lib/shadow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shadow.cpp')
-rw-r--r--lib/shadow.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/shadow.cpp b/lib/shadow.cpp
index 1161646e..71372270 100644
--- a/lib/shadow.cpp
+++ b/lib/shadow.cpp
@@ -111,14 +111,11 @@ Zstring ShadowCopy::makeShadowCopy(const Zstring& inputFile, const std::function
const Zstring volumeNamePf = appendSeparator(&volBuffer[0]); //msdn: if buffer is 1 char too short, GetVolumePathName() may skip last separator without error!
//input file is always absolute! directory formatting takes care of this! Therefore volume name can always be found.
- const size_t pos = filenameFinal.find(volumeNamePf); //filenameFinal needs NOT to begin with volumeNamePf: consider for example \\?\ prefix!
+ const size_t pos = filenameFinal.find(volumeNamePf); //filenameFinal needs NOT to begin with volumeNamePf: consider \\?\ prefix!
if (pos == Zstring::npos)
- {
- std::wstring msg = _("Volume name %x not part of file name %y.");
- replace(msg, L"%x", fmtFileName(volumeNamePf), false);
- replace(msg, L"%y", fmtFileName(filenameFinal), false);
- throw FileError(msg);
- }
+ throw FileError(replaceCpy(replaceCpy(_("Volume name %x is not part of file path %y."),
+ L"%x", fmtFileName(volumeNamePf)),
+ L"%y", fmtFileName(filenameFinal)));
//get or create instance of shadow volume
VolNameShadowMap::const_iterator it = shadowVol.find(volumeNamePf);
bgstack15