Changeset 39c838b55ff587f3aad3035e15139fd2f91d77ba
- Timestamp:
- 11/02/06 18:00:08
(3 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1139677208 +0000
- git-parent:
[4bfb6dac85dfaedefe5b79ff6cf822918cc96b5e]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1139677208 +0000
- Message:
Use vlc_fopen (access() or stat() would be more appropriate though)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4148d93 |
r39c838b |
|
| 417 | 417 | { |
|---|
| 418 | 418 | FILE *f; |
|---|
| 419 | | char *psz_UTF8_path; |
|---|
| 420 | | char *psz_locale_path; |
|---|
| 421 | | |
|---|
| 422 | | asprintf( &psz_UTF8_path, "%s%s", j < 0 ? f_dir : *subdirs, p_fixed_name ); |
|---|
| 423 | | psz_locale_path = ToLocale( psz_UTF8_path ); |
|---|
| | 419 | char *psz_path; |
|---|
| | 420 | |
|---|
| | 421 | asprintf( &psz_path, "%s%s", j < 0 ? f_dir : *subdirs, p_fixed_name ); |
|---|
| 424 | 422 | msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", p_fixed_name, i_prio ); |
|---|
| 425 | | if( ( f = fopen( psz_locale_path, "rt" ) ) ) |
|---|
| | 423 | /* FIXME: a portable wrapper for stat() or access() would be more suited */ |
|---|
| | 424 | if( ( f = vlc_fopen( psz_path, "rt" ) ) ) |
|---|
| 426 | 425 | { |
|---|
| 427 | 426 | fclose( f ); |
|---|
| 428 | | LocaleFree( psz_locale_path ); |
|---|
| 429 | 427 | msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", p_fixed_name, i_prio ); |
|---|
| 430 | 428 | result[i_sub_count].priority = i_prio; |
|---|