Make fopen() and stat() support UTF-8 paths on Windows
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <cdio/logging.h>
|
||||
#include <cdio/sector.h>
|
||||
#include <cdio/util.h>
|
||||
#include <cdio/utf8.h>
|
||||
#include <cdio/version.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
@@ -69,6 +70,12 @@
|
||||
#define DEFAULT_CDIO_DEVICE "videocd.bin"
|
||||
#define DEFAULT_CDIO_CDRDAO "videocd.toc"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CDIO_FOPEN fopen_utf8
|
||||
#else
|
||||
#define CDIO_FOPEN fopen
|
||||
#endif
|
||||
|
||||
#include "image_common.h"
|
||||
|
||||
static lsn_t get_disc_last_lsn_cdrdao (void *p_user_data);
|
||||
@@ -312,7 +319,7 @@ parse_tocfile (_img_private_t *cd, const char *psz_cue_name)
|
||||
if (NULL == psz_cue_name_dup)
|
||||
return false;
|
||||
|
||||
fp = fopen (psz_cue_name_dup, "r");
|
||||
fp = CDIO_FOPEN (psz_cue_name_dup, "r");
|
||||
free(psz_cue_name_dup);
|
||||
if (fp == NULL) {
|
||||
cdio_log(log_level, "error opening %s for reading: %s",
|
||||
|
||||
Reference in New Issue
Block a user