changeset 322:32dad60229d6 trunk

[svn] - make this more robust
author nenolod
date Thu, 30 Nov 2006 22:57:16 -0800
parents f2341e9c17e4
children 230decbfe9be
files ChangeLog src/console/Audacious_Driver.cxx
diffstat 2 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 30 22:50:44 2006 -0800
+++ b/ChangeLog	Thu Nov 30 22:57:16 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-01 06:50:44 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [706]
+  - fix is_our_file() behaviour
+  
+  trunk/src/console/Audacious_Driver.cxx |   25 ++++++++++++++++++++++++-
+  1 file changed, 24 insertions(+), 1 deletion(-)
+
+
 2006-12-01 05:22:11 +0000  William Pitcock <nenolod@nenolod.net>
   revision [704]
   - return -1 (nonfatal error) in legacy is_our_file.
--- a/src/console/Audacious_Driver.cxx	Thu Nov 30 22:50:44 2006 -0800
+++ b/src/console/Audacious_Driver.cxx	Thu Nov 30 22:57:16 2006 -0800
@@ -432,13 +432,9 @@
 
 	// open file if not already open
 	Vfs_File_Reader in;
-	if ( !fd )
-	{
-		if ( log_err( in.open( url.path ) ) ) return false;
-		fd = in.file();
-		// in will be closed when function ends
-	}
-	
+	if ( log_err( in.open( url.path ) ) ) return false;
+	fd = in.file();
+
 	// read header and identify type
 	gchar header [4] = { };
 	vfs_fread( header, sizeof header, 1, fd );