summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'playlist.c')
-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);