1 --- cvs-1.11.4/src/filesubr.c.orig Tue Sep 24 22:47:09 2002
2 +++ cvs-1.11.4/src/filesubr.c Fri Jan 17 20:59:20 2003
4 file system semantics. */
10 static int deep_remove_dir PROTO((const char *path));
15 - char *path = xmalloc (strlen (dir) + 1 + strlen(file) + 1);
16 - sprintf (path, "%s/%s", dir, file);
19 + int isdot = (*file == '.');
21 + if ( (path = getenv("CONFIG_DIR")) && path[0] ) {
22 + cfgdir = xmalloc(strlen(dir) + 1 + strlen(path) + 1);
23 + sprintf(cfgdir, "%s/%s", dir, path);
26 + if ( cfgdir && (stat(cfgdir, &st) != -1) && S_ISDIR(st.st_mode) ) {
27 + path = xmalloc(strlen(cfgdir) + 1 + strlen(file)-isdot + 1);
28 + sprintf (path, "%s/%s", cfgdir, file+isdot);
30 + path = xmalloc (strlen (dir) + 1 + strlen(file) + 1);
31 + sprintf (path, "%s/%s", dir, file);