projects
/
personal
/
aptbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec34c10
)
Fixed a bug where adding an account replaced the main.py file
author
Georgios Atheridis
<atheridis@tutamail.com>
Wed, 1 Jun 2022 11:25:05 +0000
(14:25 +0300)
committer
Georgios Atheridis
<atheridis@tutamail.com>
Wed, 1 Jun 2022 11:25:05 +0000
(14:25 +0300)
aptbot/args_logic.py
patch
|
blob
|
history
diff --git
a/aptbot/args_logic.py
b/aptbot/args_logic.py
index 8d143a2f064e5634e88133d146893184a7ed8a2c..3f715639f9525345608d775097d948500a579766 100644
(file)
--- a/
aptbot/args_logic.py
+++ b/
aptbot/args_logic.py
@@
-24,10
+24,13
@@
def add_account(s: socket.socket, acc: str):
pass
os.makedirs(account_path, exist_ok=True)
- shutil.copyfile(
- os.path.join(os.path.dirname(os.path.realpath(__file__)), "resources/main.py"),
- os.path.join(account_path, "main.py"),
- )
+ if not os.path.exists(os.path.join(account_path, "main.py")):
+ shutil.copyfile(
+ os.path.join(
+ os.path.dirname(os.path.realpath(__file__)), "resources/main.py"
+ ),
+ os.path.join(account_path, "main.py"),
+ )
command = BotCommands.JOIN.value
channel = acc