You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by mh...@apache.org on 2009/09/24 02:49:20 UTC

svn commit: r818331 - /couchdb/site/bin/build.py

Author: mhammond
Date: Thu Sep 24 00:49:19 2009
New Revision: 818331

URL: http://svn.apache.org/viewvc?rev=818331&view=rev
Log:
allow site build script to work on Windows

Modified:
    couchdb/site/bin/build.py

Modified: couchdb/site/bin/build.py
URL: http://svn.apache.org/viewvc/couchdb/site/bin/build.py?rev=818331&r1=818330&r2=818331&view=diff
==============================================================================
--- couchdb/site/bin/build.py (original)
+++ couchdb/site/bin/build.py Thu Sep 24 00:49:19 2009
@@ -97,7 +97,10 @@
     def url(self):
         if self['location']:
             return self['location']
-        fname = self.html_filename[len(self.site.docroot):].lstrip('/')
+        fname = self.html_filename[len(self.site.docroot):].lstrip(os.sep)
+        if os.sep != "/":
+            # slash is always the sep for a URL.
+            fname = fname.replace(os.sep, "/")
         return fname
 
     def relative_url(self, page):