From 9e044cbd4c227aa937056254f36b8837d6d9db97 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Thu, 25 Aug 2005 11:12:37 +0000 Subject: [PATCH] removed not-in-the-right-place line, replaced os.path.slpit with basename when only file_name is needed --- src/common/socks5.py | 1 - src/filetransfers_window.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index 561a7e191..20b14a338 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -759,7 +759,6 @@ class Socks5Listener: res = select.select([self._serv],[],[],timeout) return res[0] except Exception, e: - self.file_props['started'] = True return False class Socks5Receiver(Socks5): diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py index 8383db2c2..7d6035e09 100644 --- a/src/filetransfers_window.py +++ b/src/filetransfers_window.py @@ -136,6 +136,7 @@ class FileTransfersWindow: self.window.present() self.window.window.focus() if file_props['type'] == 'r': + # file path is used below in 'Save in' (file_path, file_name) = os.path.split(file_props['file-name']) else: file_name = file_props['name'] @@ -163,9 +164,8 @@ class FileTransfersWindow: recipient = ('You') sectext += recipient if file_props['type'] == 'r': - (path, file) = os.path.split(file_props['file-name']) sectext += '\n\t' +_('Saved in: %s') % \ - gtkgui_helpers.escape_for_pango_markup(path) + gtkgui_helpers.escape_for_pango_markup(file_path) dialog = dialogs.HigDialog(None, _('File transfer completed'), sectext, gtk.STOCK_DIALOG_INFO, [ [_('_Open Containing Folder'), gtk.RESPONSE_ACCEPT], @@ -208,7 +208,7 @@ _('Connection with peer cannot be established.')) self.window.present() self.window.window.focus() if file_props['type'] == 'r': - (file_path, file_name) = os.path.split(file_props['file-name']) + file_name = os.path.basename(file_props['file-name']) else: file_name = file_props['name'] sectext = '\t' + _('Filename: %s') % \