From: Alain Spineux Date: Wed, 5 Aug 2020 08:08:32 +0000 (+0200) Subject: BEE Backport bacula/src/win32/filed/vss_generic.cpp X-Git-Tag: Release-11.3.2~1323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0142cd73b7681ee085eeed2aedacc8f61d5e7f72;p=thirdparty%2Fbacula.git BEE Backport bacula/src/win32/filed/vss_generic.cpp This commit is the result of the squash of the following main commits: Author: Alain Spineux Date: Tue Aug 28 17:14:31 2018 +0200 snapshot: maintain both paths instead of stripping and unstripping - snap_fname is the path inside the snapshot used for "system" operation - fname is the path from the FileSet used for display and for SD or DIR "computation" - when snapshot is not in used, both are equal --- diff --git a/bacula/src/win32/filed/vss_generic.cpp b/bacula/src/win32/filed/vss_generic.cpp index c113a446eb..0cedb947f5 100644 --- a/bacula/src/win32/filed/vss_generic.cpp +++ b/bacula/src/win32/filed/vss_generic.cpp @@ -485,14 +485,15 @@ bool VSSClientGeneric::CreateSnapshots(alist *mount_points) for (int i=0; i < mount_points->size(); i++) { wchar_t *p = (wchar_t *)mount_points->get(i); // store uniquevolumname - if (SUCCEEDED(pVssObj->AddToSnapshotSet(p, GUID_NULL, &pid))) { + int hresult = pVssObj->AddToSnapshotSet(p, GUID_NULL, &pid); + if (SUCCEEDED(hresult)) { MTabEntry *elt = (MTabEntry*)m_VolumeList->entries->search(p, volume_cmp); ASSERT2(elt, "Should find the volume in the list"); Jmsg(m_jcr, M_INFO, 0, " Snapshot mount point: %ls\n", elt->first()); Dmsg1(50, "AddToSnapshot OK for Vol: %ls\n", p); } else { //Dmsg1(50, "AddToSnapshot() failed for Vol: %ls\n", (LPWSTR)volume.c_str()); - //Dmsg1(50, "AddToSnapshot() failed for path: %s\n", p); + Dmsg2(50, "AddToSnapshot() failed for path: %ls hresult=0x%x\n", p, hresult); } }