Line 0
Link Here
|
|
|
1 |
--- htags/htags.c 2004/09/01 14:44:33 1.14 |
2 |
+++ htags/htags.c 2004/09/01 21:58:28 1.15 |
3 |
@@ -61,7 +61,6 @@ |
4 |
char *save_config; |
5 |
char *save_argv; |
6 |
|
7 |
-char rootpath[MAXPATHLEN]; |
8 |
char cwdpath[MAXPATHLEN]; |
9 |
char dbpath[MAXPATHLEN]; |
10 |
char distpath[MAXPATHLEN]; |
11 |
@@ -1481,11 +1480,14 @@ |
12 |
strbuf_close(sb); |
13 |
} |
14 |
/* |
15 |
- * get root, cwd and dbpath. |
16 |
+ * get dbpath. |
17 |
*/ |
18 |
- getdbpath(cwdpath, rootpath, dbpath, 0); |
19 |
+ if (!getcwd(cwdpath, sizeof(cwdpath))) |
20 |
+ die("cannot get current directory."); |
21 |
if (arg_dbpath[0]) |
22 |
strlimcpy(dbpath, arg_dbpath, sizeof(dbpath)); |
23 |
+ else |
24 |
+ strlimcpy(dbpath, cwdpath, sizeof(cwdpath)); |
25 |
|
26 |
if (cflag && !usable("gzip")) { |
27 |
warning("'gzip' command not found. -c option ignored."); |