'Release the lock on the file pointed to by path. Will also release the lock on any hardlinks to path'

def release_file(self, path):

    key = None
    for (p, h) in self.handle_map.iteritems():
        if samefile_windows(path, p):
            key = (p, h)
            break
    if (key is not None):
        import win32file
        win32file.CloseHandle(key[1])
        remove = [f for (f, h) in self.handle_map.iteritems() if (h is key[1])]
        for x in remove:
            self.handle_map.pop(x)
