- client: fix problem with recursion in dir_size(), this time for real.

svn path=/trunk/boinc/; revision=23529
This commit is contained in:
David Anderson 2011-05-12 05:26:37 +00:00
parent ebc0bece9b
commit 26ae326349
2 changed files with 8 additions and 2 deletions

View File

@ -2924,3 +2924,9 @@ David 11 May 2011
client/
pers_file_xfer.cpp
file_xfer.cpp
David 11 May 2011
- client: fix problem with recursion in dir_size(), this time for real.
lib/
filesys.cpp

View File

@ -87,13 +87,13 @@ char boinc_failed_file[256];
int is_file(const char* path) {
struct stat sbuf;
int retval = stat(path, &sbuf);
int retval = lstat(path, &sbuf);
return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFREG));
}
int is_dir(const char* path) {
struct stat sbuf;
int retval = stat(path, &sbuf);
int retval = lstat(path, &sbuf);
return (!retval && (((sbuf.st_mode) & S_IFMT) == S_IFDIR));
}