David Gow : quartz: Test: Files opened with FileSource can be deleted.
Alexandre Julliard
julliard at winehq.org
Wed Aug 10 14:52:12 CDT 2022
Module: wine
Branch: master
Commit: cf41f6d9b5ca04125031b454cf22a423612628ea
URL: https://gitlab.winehq.org/wine/wine/-/commit/cf41f6d9b5ca04125031b454cf22a423612628ea
Author: David Gow <david at ingeniumdigital.com>
Date: Tue Aug 9 21:02:40 2022 +0800
quartz: Test: Files opened with FileSource can be deleted.
Some games (such as Digimon Survive) will delete a file while it's open
as a FileSource.
Signed-off-by: David Gow <david at ingeniumdigital.com>
---
dlls/quartz/tests/filesource.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/dlls/quartz/tests/filesource.c b/dlls/quartz/tests/filesource.c
index c383d9f6579..268b265ac77 100644
--- a/dlls/quartz/tests/filesource.c
+++ b/dlls/quartz/tests/filesource.c
@@ -1476,6 +1476,24 @@ static void test_connect_pin(void)
ok(ret, "Failed to delete file, error %lu.\n", GetLastError());
}
+static void test_file_share_delete(void)
+{
+ const WCHAR *filename = load_resource(L"test.avi");
+ IBaseFilter *filter = create_file_source();
+ ULONG ref;
+ BOOL ret;
+
+ load_file(filter, filename);
+
+ /* Test that we can delete the file while it's open. */
+ ret = DeleteFileW(filename);
+ ok(ret, "Failed to delete file, error %lu.\n", GetLastError());
+
+ ref = IBaseFilter_Release(filter);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
+}
+
+
START_TEST(filesource)
{
CoInitialize(NULL);
@@ -1490,6 +1508,7 @@ START_TEST(filesource)
test_async_reader();
test_enum_media_types();
test_connect_pin();
+ test_file_share_delete();
CoUninitialize();
}
More information about the wine-cvs
mailing list