diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-30 21:22:24 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-12-30 21:22:24 +0100 |
commit | fd3e9a424015a7fa6de4027658628e2c5c9263a6 (patch) | |
tree | 864aefac4e4b458775ef04db879a35cf0f91c601 /playlist.c | |
parent | 9ffb5924be3a78c5c0e5512b2616d1307ee35944 (diff) |
fixed bug in uri location handler (pl_insert_file)
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -550,7 +550,7 @@ pl_insert_pls (playItem_t *after, const char *fname, int *pabort, int (*cb)(play playItem_t * pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(playItem_t *it, void *data), void *user_data) { - if (!fname) { + if (!fname || !(*fname)) { return NULL; } @@ -580,7 +580,7 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla if (strncasecmp (fname, "file://", 7)) { const char *p = fname; int detect_on_access = 1; - for (p = fname; *p; p++) { + for (; *p; p++) { if (!strncmp (p, "://", 3)) { break; } @@ -589,7 +589,7 @@ pl_insert_file (playItem_t *after, const char *fname, int *pabort, int (*cb)(pla break; } } - if (detect_on_access && *fname != ':') { + if (detect_on_access && *p == ':') { playItem_t *it = pl_item_alloc (); it->decoder = NULL; it->fname = strdup (fname); |