This commit is contained in:
		| @@ -73,6 +73,9 @@ TYPED_TEST(winfsp_test, rename_fails_if_dest_exists_and_replace_is_false) { | ||||
|   auto file_path2{ | ||||
|       utils::path::combine(dir_path, {"test_file2_4"}), | ||||
|   }; | ||||
|   auto file_path3{ | ||||
|       utils::path::combine(dir_path, {"test_file_5"}), | ||||
|   }; | ||||
|  | ||||
|   ASSERT_TRUE(::CreateDirectoryA(dir_path.c_str(), nullptr)); | ||||
|  | ||||
| @@ -84,7 +87,7 @@ TYPED_TEST(winfsp_test, rename_fails_if_dest_exists_and_replace_is_false) { | ||||
|  | ||||
|   EXPECT_TRUE(::MoveFileExA(file_path.c_str(), file_path2.c_str(), 0)); | ||||
|  | ||||
|   handle = ::CreateFileA(file_path.c_str(), GENERIC_READ | GENERIC_WRITE, | ||||
|   handle = ::CreateFileA(file_path3.c_str(), GENERIC_READ | GENERIC_WRITE, | ||||
|                          FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, | ||||
|                          CREATE_NEW, FILE_ATTRIBUTE_NORMAL, nullptr); | ||||
|   ASSERT_NE(INVALID_HANDLE_VALUE, handle); | ||||
| @@ -93,7 +96,7 @@ TYPED_TEST(winfsp_test, rename_fails_if_dest_exists_and_replace_is_false) { | ||||
|   EXPECT_FALSE(::MoveFileExA(file_path.c_str(), file_path2.c_str(), 0)); | ||||
|   EXPECT_EQ(ERROR_ALREADY_EXISTS, ::GetLastError()); | ||||
|  | ||||
|   EXPECT_TRUE(::DeleteFileA(file_path.c_str())); | ||||
|   EXPECT_TRUE(::DeleteFileA(file_path3.c_str())); | ||||
|   EXPECT_TRUE(::DeleteFileA(file_path2.c_str())); | ||||
|   EXPECT_TRUE(::RemoveDirectoryA(dir_path.c_str())); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user