mirror of
https://github.com/aclist/dztui.git
synced 2026-10-28 05:32:44 +01:00
feat: delete shortcut
This commit is contained in:
1 parent
96b91fd87c
commit
dfeafc3d28
2 files changed
+20
-16
No files matched your search
@@ -161,9 +161,10 @@ class Shortcuts:
|
||||
return NEW_ENTRY
|
||||
|
||||
def delete_shortcut(self, start_path: Path) -> None:
|
||||
for s in self.shortcuts["shortcuts"]:
|
||||
if self.shortcuts[s]["StartDir"] == str(start_path):
|
||||
del self.shortcuts[s]
|
||||
shortcuts = self.shortcuts["shortcuts"]
|
||||
for s in shortcuts:
|
||||
if shortcuts[s]["StartDir"] == str(start_path):
|
||||
del shortcuts[s]
|
||||
break
|
||||
self.save_shortcuts()
|
||||
|
||||
|
||||
Reference in new issue
Block a user