From 16e95b03e828af3eb5f86753edcbabfc1588697e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Wed, 22 Nov 2017 17:14:31 +0100 Subject: [PATCH] Fix WinAPI watcher to be consistent. --- source/eventcore/drivers/winapi/watchers.d | 1 + 1 file changed, 1 insertion(+) diff --git a/source/eventcore/drivers/winapi/watchers.d b/source/eventcore/drivers/winapi/watchers.d index 2eff613..db9bae9 100644 --- a/source/eventcore/drivers/winapi/watchers.d +++ b/source/eventcore/drivers/winapi/watchers.d @@ -123,6 +123,7 @@ final class WinAPIEventDriverWatchers : EventDriverWatchers { auto path = () @trusted { scope (failure) assert(false); return to!string(fni.FileName[0 .. fni.FileNameLength/2]); } (); auto fullpath = buildPath(slot.directory, path); ch.directory = dirName(path); + if (ch.directory == ".") ch.directory = ""; ch.name = baseName(path); try ch.isDirectory = isDir(fullpath); catch (Exception e) {} // FIXME: can happen if the base path is relative and the CWD has changed