[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QFtp abort and remove
From:       Bram Biesbrouck <b () beligum ! org>
Date:       2006-01-15 14:50:39
Message-ID: 200601151550.39977.b () beligum ! org
[Download RAW message or body]

That did the trick, thanks.

Op zondag 15 januari 2006 15:36, schreef Kevin Krammer:
> On Sunday 15 January 2006 15:19, Bram Biesbrouck wrote:
> > Hi all,
> >
> > I'm using QFtp to upload a file to a server. While uploading, the process
> > is visualized by using a progressbar. When the user clicks cancel, the
> > FTP command (put) is aborted and the uploaded chunk is deleted.
> > However, it seems that the file never gets deleted. Does anyone know
> > what's wrong here?
> >
> > (progress is a KProgressDialog)
> >
> > ftp->cd(ftpDirectory);
> > ftp->put(localfile, REMOTE_FILENAME);
> > progress->exec();
> > if (progress->wasCancelled()){
> > 	ftp->abort();
> > 	ftp->remove(REMOTE_FILENAME);
> > 	ftp->close();
> > 	transmissionDone(true);
> > 	return;
> > }
>
> close() might not wait for remove() to be finished.
> Better delay close() to the slot that reacts on finished operations.
>
> Cheers,
> Kevin
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic