From 230745c8d07eb04970679c61e4399cbf100060a1 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Fri, 26 May 2017 12:30:46 +0200 Subject: [PATCH 1/2] win, doc: document per-drive current working dir Add note to fs.md and path.md about Windows using per-drive current working directory. Fixes: https://github.com/nodejs/node/issues/9378 --- doc/api/fs.md | 7 +++++++ doc/api/path.md | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 9ee328e6523218..c962168a71465e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -94,6 +94,12 @@ Error: EISDIR: illegal operation on a directory, read ``` +*Note:* On Windows Node follows the concept of per-drive working directory. +This behavior can be observed when using a drive path without backslash, e.g. +`fs.readdirSync('c:\\')` can potentially return different result than +`fs.readdirSync('c:')`. For more information see +[this MSDN page][MSDN-Rel-Path]. + ## WHATWG URL object support