From c9e08df9a5d2fab2161c32de5e348f17f7b13ecf Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 8 Aug 2009 23:19:38 +0200 Subject: [PATCH] always show whole address when dealing with links --- src/song.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/song.cpp b/src/song.cpp index 4f7ab90e..dc97cf5d 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -494,8 +494,11 @@ void MPD::Song::SetHashAndSlash() { if (!itsSong->file) return; - const char *tmp = strrchr(itsSong->file, '/'); - itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos; + if (!isStream()) + { + const char *tmp = strrchr(itsSong->file, '/'); + itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos; + } itsHash = calc_hash(itsSong->file); }