(main): Copy cwd when appending slash.

This commit is contained in:
Richard M. Stallman 1996-06-09 19:12:26 +00:00
parent 2837b9df2e
commit f55aa55a81

View 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