equal
deleted
inserted
replaced
121 def strip(self, path): |
121 def strip(self, path): |
122 '''strip leading slashes from local path, turn into web-safe path.''' |
122 '''strip leading slashes from local path, turn into web-safe path.''' |
123 |
123 |
124 path = util.pconvert(path) |
124 path = util.pconvert(path) |
125 count = self.stripcount |
125 count = self.stripcount |
126 while path and count >= 0: |
126 while count > 0: |
127 c = path.find('/') |
127 c = path.find('/') |
128 if c == -1: |
128 if c == -1: |
129 break |
129 break |
130 path = path[c+1:] |
130 path = path[c+1:] |
131 count -= 1 |
131 count -= 1 |