* Don't traverse symlinks.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28423 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-11-01 12:35:28 +00:00
parent e9a7a65fd7
commit 2395e3a496
@@ -146,7 +146,7 @@ void
process_file(const char* path)
{
struct stat stat;
if (::stat(path, &stat) != 0) {
if (::lstat(path, &stat) != 0) {
fprintf(stderr, "Could not stat file \"%s\": %s\n", path,
strerror(errno));
return;
@@ -156,6 +156,8 @@ process_file(const char* path)
process_directory(path);
return;
}
if (S_ISLNK(stat.st_mode))
return;
int file = open(path, O_RDONLY);
if (file < 0) {