From 197cf649bf795e740157b8bab66893d74edb3087 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 25 Nov 2009 08:22:57 +0000 Subject: [PATCH] (trunk) more magnet work. fix a couple of bugs reported by rolcol: (1) crash with incomplete dir + magnet links; (2) dialog focus issue in the gtk client --- gtk/add-dialog.c | 2 +- libtransmission/torrent.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/add-dialog.c b/gtk/add-dialog.c index f31cc888f..24beea347 100644 --- a/gtk/add-dialog.c +++ b/gtk/add-dialog.c @@ -519,7 +519,7 @@ addURLDialog( GtkWindow * parent, TrCore * core ) GtkWidget * w; w = gtk_dialog_new_with_buttons( _( "Add URL" ), parent, - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, + GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT, NULL ); diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 221e3403d..1a6f4b7a5 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -2726,6 +2726,8 @@ refreshCurrentDir( tr_torrent * tor ) if( tor->incompleteDir == NULL ) dir = tor->downloadDir; + else if( !tr_torrentHasMetadata( tor ) ) /* no files to find */ + dir = tor->incompleteDir; else if( !tr_torrentFindFile2( tor, 0, &dir, &sub ) ) dir = tor->incompleteDir;