newfol: ensure database directory exists.
This commit is contained in:
parent
efaefd32a5
commit
e7e4d3fb61
1 changed files with 6 additions and 0 deletions
6
newfol
6
newfol
|
|
@ -159,7 +159,13 @@ def parse_args(args):
|
|||
type=int, default=0, help="minimum number of fields per record")
|
||||
return parser.parse_args(args)
|
||||
|
||||
def ensure_db_dir():
|
||||
path = os.path.expanduser("~/.newfol")
|
||||
if not os.path.exists(path):
|
||||
os.mkdir(path, 0o777)
|
||||
|
||||
def main(args):
|
||||
ensure_db_dir()
|
||||
vault = filemanip.FileStorage('csv', os.path.expanduser("~/.newfol/dtb"))
|
||||
recs = []
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue