Commit 3d842a29 authored by Joe Orton's avatar Joe Orton
Browse files

* support/htcacheclean.c (directory_empty): Remove unused function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232218 13f79535-47bb-0310-9956-ffa450edef68
parent 5e856888
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -319,32 +319,6 @@ static void delete_entry(char *path, char *basename, apr_pool_t *pool)
    }
}

/*
 * Determine if a directory is empty
 */
static int directory_empty(char *path, apr_pool_t *pool)
{
    apr_dir_t *dir;
    apr_finfo_t info;
    
    if (apr_dir_open(&dir, path, pool) != APR_SUCCESS) {
        return 0;
    }

    while (apr_dir_read(&info, 0, dir) == APR_SUCCESS && !interrupted) {
        if (!strcmp(info.name, ".") || !strcmp(info.name, "..")) {
            continue;
        }
        
        /* If we're here, the directory is not empty */
        apr_dir_close(dir);
        return 0;
    }

    apr_dir_close(dir);
    return 1;
}

/*
 * walk the cache directory tree
 */