summaryrefslogtreecommitdiff
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
authorKonstantin Kudakov <mifodix777@gmail.com>2014-01-03 16:30:26 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-11 16:29:00 +0100
commit8c286b46869ea6e139efe44b3ee553bcc19219e9 (patch)
treec5f97fc68a156f425b91857d3fadfa7177b4809a /apps/cuesheet.c
parent5d37d2579ae3a84175239e1b8f6c1ca39965e88c (diff)
cuesheet: Search for /path/to/music.mp3.cue as well if all fails.
Change-Id: If58ea7c7b94de54f6d9b014f069807bb88c6a147
Diffstat (limited to 'apps/cuesheet.c')
-rw-r--r--apps/cuesheet.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 354f976997..b7b7df85a8 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -75,7 +75,12 @@ bool look_for_cuesheet_file(struct mp3entry *track_id3, struct cuesheet_file *cu
char *dot = strrchr(cuepath, '.');
strcpy(dot, ".cue");
if (!file_exists(cuepath))
- return false;
+ {
+ strlcpy(cuepath, track_id3->path, MAX_PATH);
+ strlcat(cuepath, ".cue", MAX_PATH);
+ if (!file_exists(cuepath))
+ return false;
+ }
}
strlcpy(cue_file->path, cuepath, MAX_PATH);