For init_argparse, only check cwd, not parents.

So you can init an etiquette inside another.
This commit is contained in:
voussoir 2025-11-22 20:30:17 -08:00
parent 61e21fe03c
commit 21fc1c020d

View file

@ -359,11 +359,8 @@ def generate_thumbnail_argparse(args):
def init_argparse(args):
global photodb
try:
load_photodb()
except etiquette.exceptions.NoClosestPhotoDB:
pass
else:
possible = pathclass.cwd().with_child(etiquette.constants.DEFAULT_DATADIR)
if possible.is_dir:
pipeable.stderr(f'PhotoDB {photodb} already exists.')
return 0
photodb = etiquette.photodb.PhotoDB(create=True)