couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhamm...@apache.org
Subject svn commit: r818331 - /couchdb/site/bin/build.py
Date Thu, 24 Sep 2009 00:49:20 GMT
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):



Mime
View raw message