1.1 --- a/moinformat/output/directory.py Fri Apr 12 18:53:04 2019 +0200
1.2 +++ b/moinformat/output/directory.py Fri Apr 12 19:00:08 2019 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Directory output context.
1.6
1.7 -Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2018, 2019 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -43,6 +43,7 @@
1.13 self.index_name = metadata.get("index_name", "index.html")
1.14 self.page_suffix = metadata.get("page_suffix", "%shtml" % extsep)
1.15 self.root_pagename = metadata.get("root_pagename", "FrontPage")
1.16 + self.attachments_dir = metadata.get("attachments", "attachments")
1.17
1.18 # Convenience methods.
1.19
1.20 @@ -62,7 +63,7 @@
1.21 if not pagename:
1.22 return None
1.23
1.24 - self.dir.ensure(join(self.to_filename(pagename), "attachments"))
1.25 + self.dir.ensure(join(self.to_filename(pagename), self.attachments_dir))
1.26
1.27 def get_attachment_filename(self, pagename, filename):
1.28
1.29 @@ -74,7 +75,7 @@
1.30 if not pagename:
1.31 return None
1.32
1.33 - return self.dir.get_filename(join(self.to_filename(pagename), "attachments", filename))
1.34 + return self.dir.get_filename(join(self.to_filename(pagename), self.attachments_dir, filename))
1.35
1.36 def get_filename(self, filename):
1.37