From 99e7287ed7d07f57adb9ef3b3f3bb78b748c9146 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 26 Jan 2009 01:31:08 -0600 Subject: [PATCH] advpack: Don't test properties of a file if it can't be created. --- dlls/advpack/tests/files.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c index d3f7338beb9..5c6ea8de1f2 100644 --- a/dlls/advpack/tests/files.c +++ b/dlls/advpack/tests/files.c @@ -133,8 +133,13 @@ static void test_AddDelBackupEntry(void) /* create the INF file */ res = pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY); ok(res == S_OK, "Expected S_OK, got %d\n", res); - ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); - ok(DeleteFileA(path), "Expected path to exist\n"); + if (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES) + { + ok(check_ini_file_attr(path), "Expected ini file to be hidden\n"); + ok(DeleteFileA(path), "Expected path to exist\n"); + } + else + win_skip("Test file could not be created\n"); lstrcpyA(path, CURR_DIR); lstrcatA(path, "\\backup\\basename.INI");