diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/shadow.cpp | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'lib/shadow.cpp')
-rw-r--r-- | lib/shadow.cpp | 11 |
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); |