Review Request 123208: If file exists, create new one and start file transfer.
Aleix Pol Gonzalez
aleixpol at kde.org
Wed Apr 1 13:59:28 UTC 2015
> On April 1, 2015, 3 p.m., Aleix Pol Gonzalez wrote:
> > Isn't the share plugin doing this already?
>
> Ashish Bansal wrote:
> Ah, yeah it is incrementing the destination file name if it exists, I just got to know this. But I wonder why it didn't work for me. I was getting error file already exists from kdeconnect core.
>
> Ashish Bansal wrote:
> Well Is something wrong with my system or everyone has same problem?
>
> Code:
> qCDebug(KDECONNECT_PLUGIN_SHARE) << destination.toString();
> qCDebug(KDECONNECT_PLUGIN_SHARE) << "islocalfile" << destination.isLocalFile();
> qCDebug(KDECONNECT_PLUGIN_SHARE) << "exists" << QFile::exists(destination.toLocalFile());
> while (destination.isLocalFile() && QFile::exists(destination.toLocalFile())) {
> and konsole output :
>
> kdeconnect.plugin.share: File transfer
> kdeconnect.plugin.share: "/home/phantom/Downloads/datafile"
> kdeconnect.plugin.share: islocalfile false
> kdeconnect.plugin.share: exists false
> kdeconnect.plugin.share: "/home/phantom/Downloads/datafile"
> Destination QUrl QUrl( "/home/phantom/Downloads/datafile" ) lacks a scheme. Setting its scheme to 'file'.
> kdeconnect.core: FileTransferJob Downloading payload to QUrl( "/home/phantom/Downloads/datafile" )
> kdeconnect.core: file already exists
> kdeconnect.plugin.share: File transfer finished
>
>
> But that file exists and this same thing comes out to be true, true in filetransfer.cpp
> I don't know how it is possible O.o
>
> diff(in case someone is damn lazy ;P) : http://ix.io/hfw
This:
kdeconnect.plugin.share: "/home/phantom/Downloads/datafile"
Should be:
"file:///home/phantom/Downloads/datafile"
It misses a fromLocalFile, I'll add it right away.
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123208/#review78333
-----------------------------------------------------------
On April 1, 2015, 2:58 p.m., Ashish Bansal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123208/
> -----------------------------------------------------------
>
> (Updated April 1, 2015, 2:58 p.m.)
>
>
> Review request for kdeconnect, Albert Vaca Cintora and Aleix Pol Gonzalez.
>
>
> Repository: kdeconnect-kde
>
>
> Description
> -------
>
> During file transfer, If file already exists, it just gives error and transfer fails. Instead it should create new file with different name and proceed the file transfer.
>
>
> Diffs
> -----
>
> core/filetransferjob.cpp 73bad79
>
> Diff: https://git.reviewboard.kde.org/r/123208/diff/
>
>
> Testing
> -------
>
> works fine!
>
>
> Thanks,
>
> Ashish Bansal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150401/3e6443af/attachment.html>
More information about the KDEConnect
mailing list