summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-01-02 16:50:41 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2011-01-02 16:50:41 +0100
commitf78248234b3f284b77a35b3249ccfb526d18c871 (patch)
treeedb7342121257e3d93ff0605f69c63fbdd6412a7
parent4a0d339854536f65b9418c79b617bb718062905f (diff)
Prefix paths with /files in MusicDirectory::render().
-rw-r--r--music.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/music.cpp b/music.cpp
index 9193b89..ec2f537 100644
--- a/music.cpp
+++ b/music.cpp
@@ -98,11 +98,11 @@ void MusicDirectory::render(HTTP::Connection::p req, HTTPResponse& res) {
for(PathListings::iterator it = directories.begin(); it != directories.end(); it++) {
std::string rel_path = it->string().substr(music::root_directory.string().size());
- res.write(boost::str(boost::format("<a href=\"%s\">%s</a><br />") % rel_path % rel_path));
+ res.write(boost::str(boost::format("<a href=\"/files%s\">%s</a><br />") % rel_path % rel_path));
}
for(PathListings::iterator it = tracks.begin(); it != tracks.end(); it++) {
std::string rel_path = it->string().substr(music::root_directory.string().size());
- res.write(boost::str(boost::format("<a href=\"%s\">%s</a><br />") % rel_path % rel_path));
+ res.write(boost::str(boost::format("<a href=\"/files%s\">%s</a><br />") % rel_path % rel_path));
}
}