summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-31 16:10:04 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-07-31 16:10:24 +0200
commit6ea0f61e30e6ce8d75556f1af9da20ebc13f0eb0 (patch)
tree716759b208f0ca06faeefabfda624066990a46d5
parentefb0a36ae96456b3d66dd34cf4ad136c59dc1f85 (diff)
added support for uppercase .CUE extension
-rw-r--r--playlist.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/playlist.c b/playlist.c
index 2efc86c2..4132fd99 100644
--- a/playlist.c
+++ b/playlist.c
@@ -1250,16 +1250,27 @@ plt_insert_cue (playlist_t *plt, playItem_t *after, playItem_t *origin, int nums
strcpy (cuename+len, ".cue");
DB_FILE *fp = vfs_fopen (cuename);
if (!fp) {
+ strcpy (cuename+len, ".CUE");
+ fp = vfs_fopen (cuename);
+ }
+ if (!fp) {
char *ptr = cuename + len-1;
while (ptr >= cuename && *ptr != '.') {
ptr--;
}
+ if (ptr < cuename) {
+ return NULL;
+ }
strcpy (ptr+1, "cue");
fp = vfs_fopen (cuename);
if (!fp) {
- return NULL;
+ strcpy (ptr+1, "CUE");
+ fp = vfs_fopen (cuename);
}
}
+ if (!fp) {
+ return NULL;
+ }
size_t sz = vfs_fgetlength (fp);
if (sz == 0) {
vfs_fclose (fp);