mirror of https://github.com/BOINC/boinc.git
Fix is_symlink() to use S_ISLNK() macro
svn path=/trunk/boinc/; revision=15044
This commit is contained in:
parent
ff70bf259e
commit
4cfdf581f8
|
@ -3197,3 +3197,11 @@ David April 13 2008
|
||||||
client_types.C,h
|
client_types.C,h
|
||||||
lib/
|
lib/
|
||||||
filesys.C
|
filesys.C
|
||||||
|
|
||||||
|
Charlie April 14 2008
|
||||||
|
- Fix is_symlink() to use S_ISLNK() macro instead of incorrect
|
||||||
|
(sbuf.st_mode & S_IFLNK), which made it return true for regular files
|
||||||
|
and caused boinc_resolve_filename() to work incorrectly.
|
||||||
|
|
||||||
|
lib/
|
||||||
|
filesys.C
|
||||||
|
|
|
@ -92,7 +92,7 @@ int is_dir(const char* path) {
|
||||||
int is_symlink(const char* path) {
|
int is_symlink(const char* path) {
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
int retval = lstat(path, &sbuf);
|
int retval = lstat(path, &sbuf);
|
||||||
return (!retval && (sbuf.st_mode & S_IFLNK));
|
return (!retval && S_ISLNK(sbuf.st_mode));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue