]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
BOUNTY-9 (regression)
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Sep 2009 22:25:21 +0000 (22:25 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 16 Sep 2009 22:25:21 +0000 (22:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14896 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_file.c

index bc70feb140837c98745e0a7676992d6f777588c2..b88dfe81cdb27db02ac7cc499f447e141588fb2a 100644 (file)
@@ -148,7 +148,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
                switch_goto_status(status, end);
        }
 
-       if (!strstr(file_path, SWITCH_URL_SEPARATOR) && (status = switch_file_exists(file_path, fh->memory_pool)) != SWITCH_STATUS_SUCCESS) {
+
+       if ((flags & SWITCH_FILE_FLAG_WRITE) && 
+               !strstr(file_path, SWITCH_URL_SEPARATOR) && (status = switch_file_exists(file_path, fh->memory_pool)) != SWITCH_STATUS_SUCCESS) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File [%s] not created!\n", file_path);
                fh->file_interface->file_close(fh);
                UNPROTECT_INTERFACE(fh->file_interface);