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

List:       kde-commits
Subject:    kdebase/ksplashml/kcmksplash
From:       Ravikiran Rajagopal <ravi () kde ! org>
Date:       2004-02-05 20:15:26
Message-ID: 20040205201526.BA64E9907 () office ! kde ! org
[Download RAW message or body]

CVS commit by ravi: 

Delete temporary file after installation.

CCMAIL 74203-done@bugs.kde.org


  M +5 -0      installer.cpp   1.14


--- kdebase/ksplashml/kcmksplash/installer.cpp  #1.13:1.14
@@ -171,4 +171,8 @@ void SplashInstaller::addNewTheme(const 
   url.setPath(locateLocal("tmp",filename));
 
+  // Remove file from temporary directory if it aleady exists - usually the result of a failed install.
+  if ( KIO::NetAccess::exists( url, true, 0 ) )
+    KIO::NetAccess::del( url, 0 );
+
   bool rc = KIO::NetAccess::copy(srcURL, url, 0);
   if (!rc)
@@ -191,4 +195,5 @@ void SplashInstaller::addNewTheme(const 
   ad->copyTo(locateLocal("ksplashthemes","/"));
   tarFile.close();
+  KIO::NetAccess::del( url, 0 );
 
   // TODO: Update only the entries from this installation.


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

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