summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-13 01:49:41 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-13 01:49:41 +0000
commit17e29069f71a410c0cb4836a6a5e2722b50eee2d (patch)
tree7208d719e520c8f455f4afdc17488f3fb6b13014 /win32/perlhost.h
parent3ed9f206f0d30a2aff53e7dcd9ca42d692f593f3 (diff)
downloadperl-17e29069f71a410c0cb4836a6a5e2722b50eee2d.tar.gz
Integrate change #9116 from maintperl into mainline.
Win32::GetCwd() returns C: instead of C:\ in the root directory under ithreads p4raw-link: @9116 on //depot/maint-5.6/perl: 864201fef66f086d79f15d5f6659d358d38b3288 p4raw-id: //depot/perl@9119 p4raw-integrated: from //depot/maint-5.6/perl@9118 'merge in' win32/perlhost.h (@8167..)
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 7fcd5340b4..719d82ac04 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -2185,10 +2185,10 @@ CPerlHost::GetChildDir(void)
New(0, ptr, MAX_PATH+1, char);
if(ptr) {
m_pvDir->GetCurrentDirectoryA(MAX_PATH+1, ptr);
- length = strlen(ptr)-1;
- if(length > 0) {
- if((ptr[length] == '\\') || (ptr[length] == '/'))
- ptr[length] = 0;
+ length = strlen(ptr);
+ if (length > 3) {
+ if ((ptr[length-1] == '\\') || (ptr[length-1] == '/'))
+ ptr[length-1] = 0;
}
}
return ptr;