From b4e39dbcbcde8b0873a95ec700b5d876c1e2bec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 13 Sep 2006 23:22:51 +0000 Subject: Return -1 when the file is inaccessible, not found, or empty, so that other input plugins are not tried and the proper error message is returned. Bug #1550763. CVS patchset: 8232 CVS date: 2006/09/13 23:22:51 --- src/input/input_file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/input/input_file.c b/src/input/input_file.c index 09914dcf8..ed50b2c5b 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.113 2006/09/10 01:46:45 dgp85 Exp $ + * $Id: input_file.c,v 1.114 2006/09/13 23:22:51 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -364,13 +364,14 @@ static int file_plugin_open (input_plugin_t *this_gen ) { _x_message(this->stream, XINE_MSG_PERMISSION_ERROR, this->mrl, NULL); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_file: Permission denied: >%s<\n"), this->mrl); + return -1; } else if (errno == ENOENT) { _x_message(this->stream, XINE_MSG_FILE_NOT_FOUND, this->mrl, NULL); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_file: File not found: >%s<\n"), this->mrl); } - return 0; + return -1; } } @@ -400,7 +401,7 @@ static int file_plugin_open (input_plugin_t *this_gen ) { close (this->fh); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_file: File empty: >%s<\n"), this->mrl); - return 0; + return -1; } return 1; -- cgit v1.2.3