mirror of
https://github.com/instaloader/instaloader.git
synced 2024-09-11 16:22:24 +02:00
Don't fail if --sessionfile does not contain '/'
This commit is contained in:
parent
0a039b9c8c
commit
72c647829a
@ -284,7 +284,7 @@ def save_session(session: requests.Session, username: str, filename: Optional[st
|
||||
if filename is None:
|
||||
filename = get_default_session_filename(username)
|
||||
dirname = os.path.dirname(filename)
|
||||
if not os.path.exists(dirname):
|
||||
if dirname != '' and not os.path.exists(dirname):
|
||||
os.makedirs(dirname)
|
||||
os.chmod(dirname, 0o700)
|
||||
with open(filename, 'wb') as sessionfile:
|
||||
|
Loading…
Reference in New Issue
Block a user