]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
gimmie a break
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 12 Dec 2007 21:12:10 +0000 (21:12 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 12 Dec 2007 21:12:10 +0000 (21:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6705 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_apr.c

index 33003f5e136fd1072ce1536e6588a71ddb548b8a..d77ad2d887ab49f16de9b1cfe5c7ba772cf1e99e 100644 (file)
@@ -502,9 +502,11 @@ SWITCH_DECLARE(const char *) switch_dir_next_file(switch_dir_t *thedir, char *bu
        const char *name;
        
        while (apr_dir_read(&(thedir->finfo), finfo_flags, thedir->dir_handle) == SWITCH_STATUS_SUCCESS) {
+
                if (thedir->finfo.filetype != APR_REG) {
                        continue;
                }
+
                if (!(name = thedir->finfo.fname)) {
                        name = thedir->finfo.name;
                }
@@ -516,6 +518,7 @@ SWITCH_DECLARE(const char *) switch_dir_next_file(switch_dir_t *thedir, char *bu
                if (name) {
                        switch_copy_string(buf, name, len);
                        fname = buf;
+                       break;
                } else {
                        continue;
                }