From 791a2162a39377feac01359427eff1eb1c31e4f7 Mon Sep 17 00:00:00 2001 From: Colin Atkinson Date: Fri, 22 Feb 2019 11:14:48 -0500 Subject: [PATCH 1/2] fix: Make FlushAndPurgeOnCleanup accessible in C++ Adds the appropriate setters and getters to the C++ API. --- inc/winfsp/winfsp.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/winfsp/winfsp.hpp b/inc/winfsp/winfsp.hpp index d3537b38..6b73623a 100644 --- a/inc/winfsp/winfsp.hpp +++ b/inc/winfsp/winfsp.hpp @@ -612,6 +612,14 @@ public: { _VolumeParams.PassQueryDirectoryPattern = !!PassQueryDirectoryPattern; } + BOOLEAN FlushAndPurgeOnCleanup() + { + return _VolumeParams.FlushAndPurgeOnCleanup; + } + VOID SetFlushAndPurgeOnCleanup(BOOLEAN FlushAndPurgeOnCleanup) + { + _VolumeParams.FlushAndPurgeOnCleanup = !!FlushAndPurgeOnCleanup; + } PWSTR Prefix() { return _VolumeParams.Prefix; From 9cd2f6972b63ec32bfb9b330b9d3975953a3709e Mon Sep 17 00:00:00 2001 From: Colin Atkinson Date: Fri, 22 Feb 2019 11:25:02 -0500 Subject: [PATCH 2/2] Set FlushAndPurgeOnCleanup in the C++ passthrough --- Contributors.asciidoc | 1 + tst/passthrough-cpp/passthrough-cpp.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Contributors.asciidoc b/Contributors.asciidoc index 9a40da4a..1ed16483 100644 --- a/Contributors.asciidoc +++ b/Contributors.asciidoc @@ -56,6 +56,7 @@ CONTRIBUTOR LIST |=== |Ben Rubson |ben.rubson at gmail.com |Bill Zissimopoulos |billziss at navimatics.com +|Colin Atkinson (Atakama, https://atakama.com) |colin at atakama.com |Francois Karam (KS2, http://www.ks2.fr) |francois.karam at ks2.fr |Fritz Elfert |fritz-github at fritz-elfert.de |John Oberschelp |john at oberschelp.net diff --git a/tst/passthrough-cpp/passthrough-cpp.cpp b/tst/passthrough-cpp/passthrough-cpp.cpp index 4b132639..55454a3b 100644 --- a/tst/passthrough-cpp/passthrough-cpp.cpp +++ b/tst/passthrough-cpp/passthrough-cpp.cpp @@ -268,6 +268,7 @@ NTSTATUS Ptfs::Init(PVOID Host0) Host->SetPassQueryDirectoryPattern(TRUE); Host->SetVolumeCreationTime(_CreationTime); Host->SetVolumeSerialNumber(0); + Host->SetFlushAndPurgeOnCleanup(TRUE); return STATUS_SUCCESS; }