@Override
public boolean addAttachment(final Path path, final boolean copy) throws IOException {
boolean result = false;
Path baseFile = Paths.get(EngineFactory.getActiveDatabase());
if (AttachmentUtils.createAttachmentDirectory(baseFile)) {  // create if needed
<BUG>Path newPath = new File(AttachmentUtils.getAttachmentPath() + File.separator + path.getFileName()).toPath();
</BUG>
try {
if (copy) {
Files.copy(path, newPath);

@Override
public boolean addAttachment(final Path path, final boolean copy) throws IOException {
boolean result = false;
Path baseFile = Paths.get(EngineFactory.getActiveDatabase());
if (AttachmentUtils.createAttachmentDirectory(baseFile)) {  // create if needed
Path newPath = Paths.get(AttachmentUtils.getAttachmentPath() + FileUtils.separator + path.getFileName());
try {
if (copy) {
Files.copy(path, newPath);
