Changes as per CR
This commit is contained in:
parent
0c93f8a1d0
commit
dc43d21f37
1 changed files with 1 additions and 1 deletions
|
@ -203,12 +203,12 @@ void SharePlugin::shareUrl(const QUrl& url, bool open)
|
||||||
NetworkPacket packet(PACKET_TYPE_SHARE_REQUEST);
|
NetworkPacket packet(PACKET_TYPE_SHARE_REQUEST);
|
||||||
if (url.isLocalFile()) {
|
if (url.isLocalFile()) {
|
||||||
QSharedPointer<QFile> ioFile(new QFile(url.toLocalFile()));
|
QSharedPointer<QFile> ioFile(new QFile(url.toLocalFile()));
|
||||||
QFileInfo info(*ioFile);
|
|
||||||
|
|
||||||
if (!ioFile->exists()) {
|
if (!ioFile->exists()) {
|
||||||
Daemon::instance()->reportError(i18n("Could not share file"), i18n("%1 does not exist", url.toLocalFile()));
|
Daemon::instance()->reportError(i18n("Could not share file"), i18n("%1 does not exist", url.toLocalFile()));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
QFileInfo info(*ioFile);
|
||||||
packet.setPayload(ioFile, ioFile->size());
|
packet.setPayload(ioFile, ioFile->size());
|
||||||
packet.set<QString>(QStringLiteral("filename"), QUrl(url).fileName());
|
packet.set<QString>(QStringLiteral("filename"), QUrl(url).fileName());
|
||||||
packet.set<qint64>(QStringLiteral("creationTime"), info.birthTime().toMSecsSinceEpoch());
|
packet.set<qint64>(QStringLiteral("creationTime"), info.birthTime().toMSecsSinceEpoch());
|
||||||
|
|
Loading…
Reference in a new issue