diff --git a/hyde/site.py b/hyde/site.py index e3a0fd3..dc10b36 100644 --- a/hyde/site.py +++ b/hyde/site.py @@ -402,9 +402,9 @@ class Site(object): if urlparse.urlparse(path)[:2] != ("",""): return path if self.is_media(path): - return self.media_url( - FS(path).get_relative_path( - self.config.media_root_path)) + relative_path = File(path).get_relative_path( + Folder(self.config.media_root)) + return self.media_url(relative_path) else: return self.content_url(path) diff --git a/hyde/tests/test_site.py b/hyde/tests/test_site.py index 947aa3e..a64b7b9 100644 --- a/hyde/tests/test_site.py +++ b/hyde/tests/test_site.py @@ -223,8 +223,6 @@ class TestSiteWithConfig(object): path = 'media/css/site.css' assert s.is_media(path) full_url = s.full_url(path) - print s.config.media_root_path - print File(path).get_relative_path(s.config.media_root_path) assert full_url == "/" + path def test_media_url_from_resource(self):