mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 14:39:37 +00:00
Make ${.OBJDIR} canonical.
Reviewed by: bde
This commit is contained in:
parent
7b6630700d
commit
43403d166a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75973
@ -418,20 +418,12 @@ chdir_verify_path(path, obpath)
|
||||
struct stat sb;
|
||||
|
||||
if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode)) {
|
||||
if (chdir(path)) {
|
||||
if (chdir(path) == -1 || getcwd(obpath, MAXPATHLEN) == NULL) {
|
||||
warn("warning: %s", path);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
if (path[0] != '/') {
|
||||
(void) snprintf(obpath, MAXPATHLEN, "%s/%s",
|
||||
curdir, path);
|
||||
return obpath;
|
||||
}
|
||||
else
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user