fixed some nesting in delete_all

This commit is contained in:
phixxy 2026-03-05 01:30:21 -08:00
parent 8f7d484559
commit fe069eab7d

View file

@ -11,11 +11,11 @@ def make_dir(d):
os.mkdir(d)
def delete_all(d):
fc = list_all(d)
if fc:
files = list_all(d)
if files:
x = input("Delete the above files? y/N ")
if x.lower() == 'y':
for file in os.listdir(d):
for file in files:
f = os.path.join(d,file)
os.remove(f)
print(f"removing: {f}")
@ -31,7 +31,7 @@ def list_all(d):
else:
for file in files:
print(file)
return len(files)
return files
def get_editor(use_v):
v = os.getenv("VISUAL")