From d1e79266308d0ab6d10e956dc74be913d2e26087 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 12 Oct 2018 20:20:04 +0800 Subject: [PATCH] Export: export attachments with attachment folder path --- src/dialog/vexportdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dialog/vexportdialog.cpp b/src/dialog/vexportdialog.cpp index 8bb96ae8..0d1c0b5f 100644 --- a/src/dialog/vexportdialog.cpp +++ b/src/dialog/vexportdialog.cpp @@ -1034,8 +1034,8 @@ int VExportDialog::doExportMarkdown(VFile *p_file, if (!attaFolder.isEmpty()) { QString attaFolderPath; attaFolderPath = noteFile->fetchAttachmentFolderPath(); - attaFolder = VUtils::getDirNameWithSequence(outputPath, attaFolder); - QString folderPath = QDir(outputPath).filePath(attaFolder); + QString relativePath = QDir(noteFile->fetchBasePath()).relativeFilePath(attaFolderPath); + QString folderPath = QDir(outputPath).filePath(relativePath); // Copy attaFolder to folderPath. if (!VUtils::copyDirectory(attaFolderPath, folderPath, false)) {