[PATCH] KSaveFile::abort() on win32
Oswald Buddenhagen
ossi at kde.org
Wed Mar 30 16:30:25 BST 2005
On Wed, Mar 30, 2005 at 04:58:10PM +0100, Jaroslaw Staniek wrote:
> +++ ksavefile.cpp 30 Mar 2005 14:53:05 -0000
> @@ -99,8 +99,17 @@
> void
> KSaveFile::abort()
> {
> +#ifdef Q_WS_WIN
> + //for win32: close before unlinking
> + QString tmpName( mTempFile.name() );
> +#else
> mTempFile.unlink();
> +#endif
> mTempFile.close();
> +#ifdef Q_WS_WIN
> + if (!tmpName.isEmpty())
> + QFile::remove( tmpName );
> +#endif
> }
>
i think in this case the order is not relevant, so just close it before
unlinking unconditionally, i'd say. waldo?
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the kde-core-devel
mailing list