[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:27 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=9379cc3

The following commit has been merged in the master branch:
commit 9379cc34f72c6f0563d3382c5ca2063709d9b98b
Author: Aleix Pol <aleixpol at kde.org>
Date:   Thu Apr 2 14:48:50 2015 +0200

    Check if file exists or not, and then call suggestName.
    
    KIO::suggestName does not checks if file with passed name exists or not. So, we need to check it
    
    REVIEW: 123225
---
 plugins/share/shareplugin.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index 65d07f0..ab0b441 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -90,7 +90,10 @@ bool SharePlugin::receivePackage(const NetworkPackage& np)
         //qCDebug(KDECONNECT_PLUGIN_SHARE) << "receiving file";
         const QString filename = np.get<QString>("filename", QString::number(QDateTime::currentMSecsSinceEpoch()));
         const QUrl dir = destinationDir().adjusted(QUrl::StripTrailingSlash);
-        const QUrl destination(dir.toString() + '/' + KIO::suggestName(dir, filename));
+        QUrl destination(dir.toString() + '/' + filename);
+        if (destination.isLocalFile() && QFile::exists(destination.toLocalFile())) {
+            destination = QUrl(dir.toString() + '/' + KIO::suggestName(dir, filename));
+        }
 
         FileTransferJob* job = np.createPayloadTransferJob(destination);
         job->setDeviceName(device()->name());

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list