Skip to content

Commit

Permalink
Changes to make Hyde run on Windows systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Bell committed Mar 5, 2010
1 parent 7bbbba4 commit bf9d2e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions hydeengine/siteinfo.py
Expand Up @@ -368,7 +368,8 @@ def target_folder(self):
@property
def temp_folder(self):
temp_folder = self.site.temp_folder
return temp_folder.child_folder_with_fragment(self.url)
# return temp_folder.child_folder_with_fragment(self.url)
return temp_folder.child_folder_with_fragment(self.fragment)

@property
def fragment(self):
Expand Down Expand Up @@ -432,7 +433,8 @@ def target_folder(self):
@property
def temp_folder(self):
temp_folder = self.site.temp_folder
return temp_folder.child_folder_with_fragment(self.url)
# return temp_folder.child_folder_with_fragment(self.url)
return temp_folder.child_folder_with_fragment(self.fragment)

class SiteInfo(SiteNode):
def __init__(self, settings, site_path):
Expand Down
4 changes: 3 additions & 1 deletion hydeengine/url.py
Expand Up @@ -2,6 +2,7 @@
Utility functions for dealing with urls.
"""
import sys

def join(parent, child):
"""
Expand All @@ -19,6 +20,8 @@ def fixslash(url, relative=True):
otherwise ensures it is not.
"""
if sys.platform == 'win32':
url = url.replace('\\', '/')
url = url.strip("/")
if relative:
url = "/" + url
Expand All @@ -31,7 +34,6 @@ def clean_url(url):
Removes .html from the url if it exists.
"""

parts = url.rsplit(".", 1)
if parts[1] == "html":
return parts[0]
Expand Down

0 comments on commit bf9d2e4

Please sign in to comment.