| @@ -4,6 +4,7 @@ Parses & holds information about the site to be generated. | |||||
| """ | """ | ||||
| import os | import os | ||||
| import fnmatch | import fnmatch | ||||
| import urlparse | |||||
| from hyde.exceptions import HydeException | from hyde.exceptions import HydeException | ||||
| from hyde.fs import FS, File, Folder | from hyde.fs import FS, File, Folder | ||||
| from hyde.model import Config | from hyde.model import Config | ||||
| @@ -398,7 +399,8 @@ class Site(object): | |||||
| Determines if the given path is media or content based on the | Determines if the given path is media or content based on the | ||||
| configuration and returns the appropriate url. | configuration and returns the appropriate url. | ||||
| """ | """ | ||||
| if urlparse.urlparse(path)[:2] != ("",""): | |||||
| return path | |||||
| if self.is_media(path): | if self.is_media(path): | ||||
| return self.media_url( | return self.media_url( | ||||
| FS(path).get_relative_path( | FS(path).get_relative_path( | ||||
| @@ -411,4 +413,4 @@ class Site(object): | |||||
| Given the relative path, determines if it is content or media. | Given the relative path, determines if it is content or media. | ||||
| """ | """ | ||||
| folder = self.content.source.child_folder(path) | folder = self.content.source.child_folder(path) | ||||
| return folder.is_descendant_of(self.config.media_root_path) | |||||
| return folder.is_descendant_of(self.config.media_root_path) | |||||