From 9a597690d750e4dcbc125a0e2f84b6e4a485fa86 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 28 Sep 2013 15:56:40 +0200 Subject: [PATCH] Directly handles file without offset. --- mingw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mingw.c b/mingw.c index 4ccc6a1e..71f3d51b 100644 --- a/mingw.c +++ b/mingw.c @@ -1132,8 +1132,10 @@ int filephy(const char* file, struct stat* st, uint64_t* physical) /* and then it doesn't have a physical address */ /* In such case we report a specific fake address, to report this special condition */ /* that it's different from the 0 offset reported by the underline file system */ - rpb->ExtentCount = 1; - rpb->Extents[0].Lcn.QuadPart = FILEPHY_WITHOUT_OFFSET; + *physical = FILEPHY_WITHOUT_OFFSET; + + CloseHandle(h); + return 0; } else { windows_errno(error); CloseHandle(h);