From kde-devel Sun Jan 15 14:50:39 2006 From: Bram Biesbrouck Date: Sun, 15 Jan 2006 14:50:39 +0000 To: kde-devel Subject: Re: QFtp abort and remove Message-Id: <200601151550.39977.b () beligum ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=113733670716335 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 <<