summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authortargetakhil <targetakhil@gmail.com>2021-03-15 09:03:06 +0530
committertargetakhil <targetakhil@gmail.com>2021-03-15 09:03:06 +0530
commita4b7966d21d40061bb02674d05d01bc443f4a7ab (patch)
tree1303ade6cc968d8934dcf4379d77d85c1b2cd1b1 /src
parentAdd faq section (diff)
downloadnheko-a4b7966d21d40061bb02674d05d01bc443f4a7ab.tar.xz
prepend file:// for linux and macos
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index ddec7287..6134262e 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -1246,7 +1246,11 @@ TimelineModel::cacheMedia(QString eventId, std::function<void(const QString)> ca QDir().mkpath(filename.path()); if (filename.isReadable()) { +#if defined(Q_OS_WIN) emit mediaCached(mxcUrl, filename.filePath()); +#else + emit mediaCached(mxcUrl, "file://" + filename.filePath()); +#endif if (callback) { callback(filename.filePath()); } @@ -1288,7 +1292,11 @@ TimelineModel::cacheMedia(QString eventId, std::function<void(const QString)> ca nhlog::ui()->warn("Error while saving file to: {}", e.what()); } +#if defined(Q_OS_WIN) emit mediaCached(mxcUrl, filename.filePath()); +#else + emit mediaCached(mxcUrl, "file://" + filename.filePath()); +#endif }); }