From: Jarkko Hietaniemi Date: Tue, 13 Mar 2001 01:49:41 +0000 (+0000) Subject: Integrate change #9116 from maintperl into mainline. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=17e29069f71a410c0cb4836a6a5e2722b50eee2d;p=p5sagit%2Fp5-mst-13.2.git 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..) --- diff --git a/win32/perlhost.h b/win32/perlhost.h index 7fcd534..719d82a 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;