fixed local folders not being created properly

This commit is contained in:
kageru 2018-03-27 17:26:57 +02:00
parent 4e258d1a04
commit 6a6017fd6b
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -42,9 +42,6 @@ def get_date_folder():
def find_valid_filename(length, ext, conn):
full_path = get_local_full_path()
if not os.path.exists(full_path):
os.makedirs(full_path)
filename = os.path.join(get_date_folder(), generate_filename(length=length, ext=ext))
i = 0
@ -66,6 +63,9 @@ def upload_local_file(path: str, mode='file') -> str:
def take_screenshot(edit=False) -> None:
full_path = get_local_full_path()
if not os.path.exists(full_path):
os.makedirs(full_path)
tempname = generate_filename(config.length, 'png')
file = os.path.join(get_local_full_path(), tempname)
call(['maim', '-suk', file])