Skip to content

Commit

Permalink
[history] create visidata_dir if not exists #2298
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed May 24, 2024
1 parent 38e3137 commit 448318d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions visidata/stored_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ def __init__(self, *args, name:str='', **kwargs):
@property
def path(self):
vdpath = Path(vd.options.visidata_dir)
if vdpath.exists():
return vdpath/(self.name + '.jsonl')
if not vdpath.exists():
if vd.options.nothing:
return
vdpath.mkdir(parents=True)
return vdpath/(self.name + '.jsonl')

def reload(self):
p = self.path
Expand Down

0 comments on commit 448318d

Please sign in to comment.