better file open failure check (FSCORE-67)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6478 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-12-03 16:17:28 +00:00
parent 947615a9ac
commit 955b8d8625
1 changed files with 2 additions and 1 deletions

View File

@ -605,7 +605,8 @@ static void load_mime_types(void)
mime_path = switch_mprintf("%s/%s", SWITCH_GLOBAL_dirs.conf_dir, cf);
assert(mime_path);
if (!(fd = open(mime_path, O_RDONLY))) {
fd = open(mime_path, O_RDONLY);
if (fd <= 0) {
return;
}