- iofile = IOFile.from_filename(file_path)
- basename, ext = file_path.rsplit('.', 1)
- if os.path.isdir(basename):
- for att_name in os.listdir(basename):
- iofile.attachments[att_name] = IOFile.from_filename(
- os.path.join(basename, att_name))
+ iofile = IOFile.from_filename(os.path.join(self.curdir, file_path))
+ iofile.attachments = attachments