always show whole address when dealing with links

This commit is contained in:
Andrzej Rybczak
2009-08-08 23:19:38 +02:00
parent 853164575f
commit c9e08df9a5

View File

@@ -494,8 +494,11 @@ void MPD::Song::SetHashAndSlash()
{ {
if (!itsSong->file) if (!itsSong->file)
return; return;
const char *tmp = strrchr(itsSong->file, '/'); if (!isStream())
itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos; {
const char *tmp = strrchr(itsSong->file, '/');
itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos;
}
itsHash = calc_hash(itsSong->file); itsHash = calc_hash(itsSong->file);
} }