summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-13 23:22:51 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-13 23:22:51 +0000
commitb4e39dbcbcde8b0873a95ec700b5d876c1e2bec3 (patch)
treed758e7b43a82539c4a89b3425a977cadba19dd8b /src
parent1733aa1f8d257417836c86292ee60cd724c7eae2 (diff)
downloadxine-lib-b4e39dbcbcde8b0873a95ec700b5d876c1e2bec3.tar.gz
xine-lib-b4e39dbcbcde8b0873a95ec700b5d876c1e2bec3.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/input/input_file.c7
1 files changed, 4 insertions, 3 deletions
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;