(main): Copy cwd when appending slash.
authorRichard M. Stallman <rms@gnu.org>
Sun, 9 Jun 1996 19:12:26 +0000 (19:12 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 9 Jun 1996 19:12:26 +0000 (19:12 +0000)
lib-src/etags.c

index 3445d2d..3494878 100644 (file)
@@ -856,8 +856,8 @@ main (argc, argv)
   if (tagfile == NULL)
     tagfile = CTAGS ? "tags" : "TAGS";
   cwd = etags_getcwd ();       /* the current working directory */
-  if (cwd[strlen(cwd)-1] != '/')
-    strcat (cwd, "/");
+  if (cwd[strlen (cwd) - 1] != '/')
+    cwd = concat (cwd, "/", "");
   if (streq (tagfile, "-"))
     tagfiledir = cwd;
   else