summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-06-18 14:08:48 +1000
committerTony Cook <tony@develop-help.com>2015-06-18 14:08:48 +1000
commit1cdd92240cabcef3700b896c9648b3a2b2970e28 (patch)
tree3b0b847318212bb36f99120b08cae470b6d4df1f
parentf5c4ec3553a69f8037ab6d54bc1e1f1e098572e8 (diff)
downloadperl-1cdd92240cabcef3700b896c9648b3a2b2970e28.tar.gz
ensure chdir('') sets $! to ENOENT on non-IMP_SYS Win32 builds
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index fa051ac440..0bb0348a5e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3366,7 +3366,7 @@ win32_rmdir(const char *dir)
DllExport int
win32_chdir(const char *dir)
{
- if (!dir) {
+ if (!dir || !*dir) {
errno = ENOENT;
return -1;
}