Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/libbb/isdirectory.c

    r821 r2725  
    44 *
    55 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
    6  * Permission has been granted to redistribute this code under the GPL.
     6 * Permission has been granted to redistribute this code under GPL.
    77 *
    8  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    99 */
    1010
     
    1313
    1414/*
    15  * Return TRUE if a fileName is a directory.
     15 * Return TRUE if fileName is a directory.
    1616 * Nonexistent files return FALSE.
    1717 */
    18 int is_directory(const char *fileName, const int followLinks, struct stat *statBuf)
     18int FAST_FUNC is_directory(const char *fileName, int followLinks, struct stat *statBuf)
    1919{
    2020    int status;
     
    2222
    2323    if (statBuf == NULL) {
    24         /* set from auto stack buffer */
    25         statBuf = &astatBuf;
     24        /* use auto stack buffer */
     25        statBuf = &astatBuf;
    2626    }
    2727
     
    3131        status = lstat(fileName, statBuf);
    3232
    33     if (status < 0 || !(S_ISDIR(statBuf->st_mode))) {
    34         status = FALSE;
    35     }
    36     else status = TRUE;
     33    status = (status == 0 && S_ISDIR(statBuf->st_mode));
    3734
    3835    return status;
Note: See TracChangeset for help on using the changeset viewer.