CVS: rdesktop disk.c,1.27,1.28
Peter ?strand <[email protected]>
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31994
Modified Files:
disk.c
Log Message:
Bugfix: When a broken symlink was found in a directory, the
directory list operation was aborted. This lead to empty directories,
or directories with too few entries.
Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** disk.c 11 May 2004 12:46:39 -0000 1.27
--- disk.c 11 May 2004 13:52:22 -0000 1.28
***************
*** 841,851 ****
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name);
- /* JIF
- printf("Stat: %s\n", fullpath); */
if (stat(fullpath, &fstat))
{
! perror("stat");
! out_uint8(out, 0);
! return STATUS_ACCESS_DENIED;
}
--- 841,861 ----
sprintf(fullpath, "%s/%s", dirname, pdirent->d_name);
if (stat(fullpath, &fstat))
{
! switch (errno)
! {
! case ENOENT:
! case ELOOP:
! case EACCES:
! /* These are non-fatal errors. */
! memset(&fstat, 0, sizeof(fstat));
! break;
! default:
! /* Fatal error. By returning STATUS_NO_SUCH_FILE,
! the directory list operation will be aborted */
! perror(fullpath);
! out_uint8(out, 0);
! return STATUS_NO_SUCH_FILE;
! }
}
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3