Show More
@@ -56,7 +56,7 b' class FileLink(object):' | |||||
56 |
|
56 | |||
57 | def __init__(self, |
|
57 | def __init__(self, | |
58 | path, |
|
58 | path, | |
59 | url_prefix='files', |
|
59 | url_prefix='files/', | |
60 | result_html_prefix='', |
|
60 | result_html_prefix='', | |
61 | result_html_suffix='<br>'): |
|
61 | result_html_suffix='<br>'): | |
62 | """ |
|
62 | """ | |
@@ -74,7 +74,7 b' class FileLink(object):' | |||||
74 | self.result_html_suffix = result_html_suffix |
|
74 | self.result_html_suffix = result_html_suffix | |
75 |
|
75 | |||
76 | def _format_path(self): |
|
76 | def _format_path(self): | |
77 |
fp = ' |
|
77 | fp = ''.join([self.url_prefix,self.path]) | |
78 | return ''.join([self.result_html_prefix, |
|
78 | return ''.join([self.result_html_prefix, | |
79 | self.html_link_str % (fp, self.path), |
|
79 | self.html_link_str % (fp, self.path), | |
80 | self.result_html_suffix]) |
|
80 | self.result_html_suffix]) | |
@@ -118,7 +118,7 b' class FileLinks(FileLink):' | |||||
118 | """ |
|
118 | """ | |
119 | def __init__(self, |
|
119 | def __init__(self, | |
120 | path, |
|
120 | path, | |
121 | url_prefix='files', |
|
121 | url_prefix='files/', | |
122 | included_suffixes=None, |
|
122 | included_suffixes=None, | |
123 | result_html_prefix='', |
|
123 | result_html_prefix='', | |
124 | result_html_suffix='<br>'): |
|
124 | result_html_suffix='<br>'): | |
@@ -140,7 +140,7 b' class FileLinks(FileLink):' | |||||
140 | result_entries = [] |
|
140 | result_entries = [] | |
141 | for root, dirs, files in walk(self.path): |
|
141 | for root, dirs, files in walk(self.path): | |
142 | for fn in files: |
|
142 | for fn in files: | |
143 |
fp = ' |
|
143 | fp = ''.join([self.url_prefix,root,'/',fn]) | |
144 | # if all files are being included, or fp has a suffix |
|
144 | # if all files are being included, or fp has a suffix | |
145 | # that is in included_suffix, create a link to fp |
|
145 | # that is in included_suffix, create a link to fp | |
146 | if self.included_suffixes == None or \ |
|
146 | if self.included_suffixes == None or \ |
General Comments 0
You need to be logged in to leave comments.
Login now