make config dir if it doesn't already exist
This commit is contained in:
parent
d03954b91a
commit
f713375a91
@ -30,7 +30,12 @@ import sys
|
|||||||
from colorama import Fore, Style
|
from colorama import Fore, Style
|
||||||
from getpass import getpass
|
from getpass import getpass
|
||||||
|
|
||||||
histfile = os.path.join(os.path.expanduser("~"), ".config/latte/history")
|
configpath = os.path.join(os.path.expanduser("~"), ".config", "latte")
|
||||||
|
if not os.path.exists(configpath):
|
||||||
|
os.mkdir(configpath)
|
||||||
|
|
||||||
|
histfile = os.path.join(configpath, "history")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
readline.read_history_file(histfile)
|
readline.read_history_file(histfile)
|
||||||
# default history len is -1 (infinite), which may grow unruly
|
# default history len is -1 (infinite), which may grow unruly
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user