diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py
index f9286114a168df7a6430ff4ad554967b0ffdbc79..770f6566f0941a59bfcc15ca7b4704d6af290e90 100644
--- a/src/filetransfers_window.py
+++ b/src/filetransfers_window.py
@@ -242,6 +242,7 @@ _('Connection with peer cannot be established.'))
 			files_path_list = dialog.get_filenames()
 			file_dir = None
 			dialog.destroy()
+			file_dir = None
 			for file_path in files_path_list:
 				file_path = file_path.decode(sys.getfilesystemencoding())
 				if os.path.isfile(file_path):