From: John E. Malmberg Date: Wed, 29 Oct 2008 22:02:43 +0000 (-0500) Subject: [patch@34600] vms.c setup_cmddsc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cfbf46cd7f497ed348c167b5b6cce3852462ff45;p=p5sagit%2Fp5-mst-13.2.git [patch@34600] vms.c setup_cmddsc From: "John E. Malmberg" Message-id: <490923D3.90407@qsl.net> Remove trailing dot when efs_charset is in effect. p4raw-id: //depot/perl@34666 --- diff --git a/vms/vms.c b/vms/vms.c index 693eeb4..fda551f 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -9892,6 +9892,19 @@ setup_cmddsc(pTHX_ const char *incmd, int check_img, int *suggest_quote, *cp2 = '\0'; if (do_tovmsspec(resspec,cp,0,NULL)) { s = vmsspec; + + /* When a UNIX spec with no file type is translated to VMS, */ + /* A trailing '.' is appended under ODS-5 rules. */ + /* Here we do not want that trailing "." as it prevents */ + /* Looking for a implied ".exe" type. */ + if (decc_efs_charset) { + int i; + i = strlen(vmsspec); + if (vmsspec[i-1] == '.') { + vmsspec[i-1] = '\0'; + } + } + if (*rest) { for (cp2 = vmsspec + strlen(vmsspec); *rest && cp2 - vmsspec < sizeof vmsspec;