-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track the full paths of attachments in the Attachment object (#71)
<!-- Please add a title in the form of a great git commit message in the imperative mood (https://cbea.ms/git-commit/) --> **What is changing**: 1. Disambiguate `Filename` and `Filepath` in the `Attachment` object. 2. Replace relative export paths with absolute ones. **Why this change is being made**: 1. Previously, we were computing the absolute path of the attachments in multiple places in different ways depending on the options given and whether the attachment was converted or not. This was confusing and error prone (see #70). 2. As a result of the first change, we are using the copied path as the file to embed or reference. When embedding in PDFs, relative paths do not work, so we need to specify the copied path (under the export path in the case of the `--copy-attachments` option) as an absolute path. **Related issue(s)**: Fixes #70 **Follow-up changes needed**: None AFAIK **Is the change completely covered by unit tests? If not, why not?**: No, similarly to converting the attachments path to an absolute path, we are not testing failures of the `filepath.Abs` function.
- Loading branch information
Showing
5 changed files
with
133 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.