summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-24 22:39:53 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-24 22:39:53 +0000
commit1c39adb236b2a53b282c5bb8af25d8436eebf688 (patch)
tree2a1f4e4a27cc9bfc19c5d34f5b46791e5b78f657 /win32
parentda41ffc5629181435ec349e6aeebfc052b334ab5 (diff)
downloadperl-1c39adb236b2a53b282c5bb8af25d8436eebf688.tar.gz
sanity check to cover the case when perl is installed into the
X:\ (drive root) p4raw-id: //depot/perl@3548
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 18821081fc..110da4fba2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -219,10 +219,13 @@ get_emd_part(char **prev_path, char *trailing_path, ...)
optr = ptr;
*ptr = '\0';
ptr = strrchr(mod_name, '/');
+ /* avoid stripping component if there is no slash,
+ * or it doesn't match ... */
if (!ptr || stricmp(ptr+1, strip) != 0) {
- if(!(*strip == '5' && *(ptr+1) == '5'
- && strncmp(strip, base, 5) == 0
- && strncmp(ptr+1, base, 5) == 0))
+ /* ... but not if component matches 5.00X* */
+ if (!ptr || !(*strip == '5' && *(ptr+1) == '5'
+ && strncmp(strip, base, 5) == 0
+ && strncmp(ptr+1, base, 5) == 0))
{
*optr = '/';
ptr = optr;