]> granicus.if.org Git - transmission/commitdiff
(trunk, qt) #4036 'Qt Client doesnt delete torrent files' -- use a patch by rb07...
authorJordan Lee <jordan@transmissionbt.com>
Sun, 19 Aug 2012 00:12:43 +0000 (00:12 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 19 Aug 2012 00:12:43 +0000 (00:12 +0000)
qt/options.cc

index 719c196f405909bd71c803137f0b501f9d40ce9b..40d6b3b564d17b13a72b8130cfdfd94939f2b652 100644 (file)
@@ -56,9 +56,11 @@ FileAdded :: executed( int64_t tag, const QString& result, struct tr_benc * argu
     if( tag != myTag )
         return;
 
-    if( result == "success" )
-        if( !myDelFile.isEmpty( ) )
-            QFile( myDelFile ).remove( );
+    if( ( result == "success" ) && !myDelFile.isEmpty( ) ) {
+        QFile file( myDelFile );
+        file.setPermissions( QFile::ReadOwner | QFile::WriteOwner );
+        file.remove();
+    }
 
     if( result != "success" ) {
         QString text = result;