From b80d33785aec1ff22f53ca05a60de8360f1dd5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 11 Mar 2014 10:32:39 +0100 Subject: [PATCH] Fixed marking device as closed (Windows variant) When closing a device, the flag keeping track of open state was not reset, and this prevented opening again (native Windows variant only). --- libntfs-3g/win32_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libntfs-3g/win32_io.c b/libntfs-3g/win32_io.c index 437a3fc7..969d8050 100644 --- a/libntfs-3g/win32_io.c +++ b/libntfs-3g/win32_io.c @@ -6,7 +6,7 @@ * Copyright (c) 2003-2004 Lode Leroy * Copyright (c) 2003-2006 Anton Altaparmakov * Copyright (c) 2004-2005 Yuval Fledel - * Copyright (c) 2012-2013 Jean-Pierre Andre + * Copyright (c) 2012-2014 Jean-Pierre Andre * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -1547,6 +1547,7 @@ static int ntfs_device_win32_close(struct ntfs_device *dev) rvl = NtClose(fd->handle) == STATUS_SUCCESS; } else rvl = CloseHandle(fd->handle); + NDevClearOpen(dev); free(fd); if (!rvl) { errno = ntfs_w32error_to_errno(GetLastError());