Update of /cvsroot/easyh10/easyh10/libgetmediainfo
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv24663/libgetmediainfo
Modified Files:
gmi_mp3_id3tag.c
Log Message:
Set info->file and info->path before opening the file. EasyH10 can find music files
without the read permission to the files, but can't open (or retrieve the information
from) them.
This bug was found while debigging on Geoff's machine.
Index: gmi_mp3_id3tag.c
===================================================================
RCS file: /cvsroot/easyh10/easyh10/libgetmediainfo/gmi_mp3_id3tag.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** gmi_mp3_id3tag.c 6 Sep 2006 00:35:52 -0000 1.1
--- gmi_mp3_id3tag.c 8 Oct 2006 11:32:27 -0000 1.2
***************
*** 335,344 ****
ucs2cat(pathname, file);
- /* Open the file with UNICODE filename. This is for better compatibility. */
- fp = ucs2fopen(pathname, "rb");
- if (!fp) {
- return -1;
- }
-
/* Set the pathname and filename. */
info->pathname = ucs2dup(path);
--- 335,338 ----
***************
*** 349,352 ****
--- 343,352 ----
info->title = gettag_setfilename(file);
+ /* Open the file with UNICODE filename. This is for better compatibility. */
+ fp = ucs2fopen(pathname, "rb");
+ if (!fp) {
+ return -1;
+ }
+
/* Open with libid3tag */
/*id3file = id3_file_open(pathname, ID3_FILE_MODE_READONLY);*/
|