From f1365a7a52bf8f49e5bde3c1cb8c4706ac3244d0 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 22 Feb 2012 09:29:07 +0000 Subject: [PATCH] fail properly if NtSetFileInformation cannot be loaded --- src/file.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/file.cpp b/src/file.cpp index cf04edfd0..6ac256211 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1612,6 +1612,12 @@ namespace libtorrent } return true; } + + // couldn't find ntdll or NtSetFileInformation function + // and the file is opened in unbuffered mode! There's + // nothing we can do! (short of re-opening the file, but + // that introduces all sorts of nasty race conditions) + return false; } LARGE_INTEGER offs;