(trunk, qt) #4036 'Qt Client doesnt delete torrent files' -- use a patch by rb07 to work around a Firefox idiosyncrasy that prevented the added .torrent file from being removed.

This commit is contained in:
Jordan Lee 2012-08-19 00:12:43 +00:00
parent 4d111ab95a
commit 3d42f7272a
1 changed files with 5 additions and 3 deletions

View 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;