Review Request 123208: If file exists, create new one and start file transfer.
Ashish Bansal
bansal.ashish096 at gmail.com
Wed Apr 1 13:32:48 UTC 2015
> On April 1, 2015, 1 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.
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
- Ashish
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123208/#review78333
-----------------------------------------------------------
On April 1, 2015, 12: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, 12: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/8402a71e/attachment-0001.html>
More information about the KDEConnect
mailing list