Blob Blame History Raw
diff -Nur audacious-plugins-3.3.3-orig/src/wavpack/wavpack.c audacious-plugins-3.3.3/src/wavpack/wavpack.c
--- audacious-plugins-3.3.3-orig/src/wavpack/wavpack.c	2012-12-11 00:49:06.000000000 +0100
+++ audacious-plugins-3.3.3/src/wavpack/wavpack.c	2013-01-03 12:35:44.973320237 +0100
@@ -93,16 +93,14 @@
     if (flags & OPEN_WVC)
     {
         SPRINTF (corrFilename, "%sc", filename);
-        *wvc_input = vfs_fopen(corrFilename, "rb");
+        if (vfs_file_test (corrFilename, VFS_IS_REGULAR))
+            * wvc_input = vfs_fopen (corrFilename, "r");
+        else
+            * wvc_input = NULL;
     }
 
-    * ctx = WavpackOpenFileInputEx (& wv_readers, wv_input, * wvc_input, error,
-     flags, 0);
-
-    if (ctx == NULL)
-        return FALSE;
-    else
-        return TRUE;
+    * ctx = WavpackOpenFileInputEx (& wv_readers, wv_input, * wvc_input, error, flags, 0);
+    return (* ctx != NULL);
 }
 
 static void wv_deattach (VFSFile * wvc_input, WavpackContext * ctx)