ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00163
[Merge] lp:~mzanetti/reminders-app/fix-filename-extension into lp:reminders-app
Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/fix-filename-extension into lp:reminders-app with lp:~mzanetti/reminders-app/save-note-after-editing-tags as a prerequisite.
Commit message:
fix the filename extension for images
use the filename extension from the file, not the mimetype
Requested reviews:
Ubuntu Reminders app developers (reminders-app-dev)
For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/fix-filename-extension/+merge/251339
--
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/fix-filename-extension into lp:reminders-app.
=== modified file 'src/libqtevernote/utils/enmldocument.cpp'
--- src/libqtevernote/utils/enmldocument.cpp 2015-02-24 22:21:04 +0000
+++ src/libqtevernote/utils/enmldocument.cpp 2015-02-27 23:22:00 +0000
@@ -159,7 +159,8 @@
if (type == TypeRichText) {
writer.writeAttribute("src", composeMediaTypeUrl(mediaType, noteGuid, hash));
} else if (type == TypeHtml) {
- QString imagePath = NotesStore::instance()->storageLocation() + hash + "." + mediaType.split('/').last();
+ QString fileName = NotesStore::instance()->note(noteGuid)->resource(hash)->fileName();
+ QString imagePath = NotesStore::instance()->storageLocation() + hash + "." + fileName.split('.').last();
writer.writeAttribute("src", imagePath);
writer.writeAttribute("id", "en-attachment/" + hash + "/" + mediaType);
}
Follow ups