fixed bug in clipboard mode

This commit is contained in:
kageru 2018-05-07 10:51:29 +02:00
parent e5b10a6b73
commit ee6229ff72
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -126,8 +126,7 @@ def notify_user(url:str, image=None) -> None:
call(['notify-send', '-a', 'pyshare', url, '-t', '3000'])
def parse_text():
text = pyperclip.paste()
def parse_text(text):
if re.match(r'(https?|s?ftp)://', text):
mirror_file(text)
elif os.path.isfile(text):