changeset 17452:0fa92a6e12b9

tmpdir: fix bug in VMS port * lib/tmpdir.c (path_search) [__VMS]: Never add slash. See Steven M. Schweda in <http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00026.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 17 Jul 2013 06:03:43 -0700
parents 1c64d8246a92
children d6a1c46258ab
files ChangeLog lib/tmpdir.c
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-07-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	tmpdir: fix bug in VMS port
+	* lib/tmpdir.c (path_search) [__VMS]: Never add slash.
+	See Steven M. Schweda in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00026.html>.
+
 2013-07-15  Paul Eggert  <eggert@cs.ucla.edu>
 
 	tmpdir: port to VMS, to // != /, and to long dirs
--- a/lib/tmpdir.c
+++ b/lib/tmpdir.c
@@ -140,10 +140,10 @@
     }
 
   dlen = strlen (dir);
+#ifdef __VMS
+  add_slash = 0;
+#else
   add_slash = dlen != 0 && !ISSLASH (dir[dlen - 1]);
-#ifdef __VMS
-  if (dlen != 0 && dir[dlen - 1] == ':')
-    add_slash = false;
 #endif
 
   /* check we have room for "${dir}/${pfx}XXXXXX\0" */