From 0a54012cf5ee72434b923bcde7d8f1a4e575ce2f Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 24 May 2020 22:01:09 +0300 Subject: [PATCH] Fixed bug with auto accept if dir doesn't exist --- toxygen/profile.py | 4 +++- toxygen/util.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index cf15e02..a0d8cd4 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -951,7 +951,9 @@ class Profile(basecontact.BaseContact, Singleton): file_number) elif auto: - path = settings['auto_accept_path'] or curr_directory() + path = settings['auto_accept_path'] + if not path or not os.path.exists(path): + path = curr_directory() self.accept_transfer(None, path + '/' + file_name, friend_number, file_number, size) tm = TransferMessage(MESSAGE_OWNER['FRIEND'], time.time(), diff --git a/toxygen/util.py b/toxygen/util.py index 73959c6..6157775 100644 --- a/toxygen/util.py +++ b/toxygen/util.py @@ -5,7 +5,7 @@ import sys import re -program_version = '0.4.3' +program_version = '0.4.4' def cached(func):