diff --git a/changelog/unreleased/issue-3090 b/changelog/unreleased/issue-3090 new file mode 100644 index 000000000..f42535c1a --- /dev/null +++ b/changelog/unreleased/issue-3090 @@ -0,0 +1,7 @@ +Bugfix: --use-fs-snapshot now works on windows/386 + +Restic failed to create VSS snapshots on windows/386 with the following error: +"GetSnapshotProperties() failed: E_INVALIDARG (0x80070057)". This is fixed now. + +https://github.com/restic/restic/issues/3087 +https://github.com/restic/restic/pull/3090 diff --git a/internal/fs/vss_windows.go b/internal/fs/vss_windows.go index e24dade80..8cee09fb1 100644 --- a/internal/fs/vss_windows.go +++ b/internal/fs/vss_windows.go @@ -482,7 +482,7 @@ func (vss *IVssBackupComponents) DeleteSnapshots(snapshotID ole.GUID) (int32, ol var result uintptr = 0 if runtime.GOARCH == "386" { - id := (*[4]uintptr)(unsafe.Pointer(ole.IID_NULL)) + id := (*[4]uintptr)(unsafe.Pointer(&snapshotID)) result, _, _ = syscall.Syscall9(vss.getVTable().deleteSnapshots, 9, uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3], @@ -506,7 +506,7 @@ func (vss *IVssBackupComponents) GetSnapshotProperties(snapshotID ole.GUID, var result uintptr = 0 if runtime.GOARCH == "386" { - id := (*[4]uintptr)(unsafe.Pointer(ole.IID_NULL)) + id := (*[4]uintptr)(unsafe.Pointer(&snapshotID)) result, _, _ = syscall.Syscall6(vss.getVTable().getSnapshotProperties, 6, uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3],