From: Oleg Broytman Date: Mon, 5 Aug 2024 20:19:03 +0000 (+0300) Subject: Feat: Delete `root_folder.linear` before storing X-Git-Tag: 5.5.0~2 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=294e09dd6264f707ef5a3607d78e7e8c7a9eede9;p=bookmarks_db.git Feat: Delete `root_folder.linear` before storing --- diff --git a/check_urls_db.py b/check_urls_db.py index 0acf33d..b8db639 100755 --- a/check_urls_db.py +++ b/check_urls_db.py @@ -158,6 +158,7 @@ def run(): print(size, "bytes eaten") break_tree(root_folder.linear) + del root_folder.linear storage.store(root_folder) if rcode: diff --git a/delete.py b/delete.py index 581aa7b..0218071 100755 --- a/delete.py +++ b/delete.py @@ -10,7 +10,7 @@ import sys __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2023 PhiloSoft Design" +__copyright__ = "Copyright (C) 2023, 2024 PhiloSoft Design" __license__ = "GNU GPL" @@ -30,7 +30,7 @@ def run(): if report_stats: print("Broytman delete bookmarks, Copyright (C)" - " 2023 PhiloSoft Design") + " 2023, 2024 PhiloSoft Design") if len(args) != 1: sys.stderr.write("Usage: delete [-s] del_file\n") @@ -91,6 +91,7 @@ def run(): del folder[_idx] del root_folder.linear[idx] break_tree(root_folder.linear) + del root_folder.linear storage.store(root_folder) if deleted and report_stats: diff --git a/set-real_title.py b/set-real_title.py index 60b3c20..3705ee9 100755 --- a/set-real_title.py +++ b/set-real_title.py @@ -9,7 +9,7 @@ import sys __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design" +__copyright__ = "Copyright (C) 2002-2024 PhiloSoft Design" __license__ = "GNU GPL" @@ -29,7 +29,7 @@ def run(): if report_stats: print("Broytman set-real_title, Copyright (C)" - " 2003-2023 PhiloSoft Design") + " 2003-2024 PhiloSoft Design") if args: sys.stderr.write("set-real_title: too many arguments\n") sys.stderr.write("Usage: set-real_title [-s]\n") @@ -43,7 +43,7 @@ def run(): sys.stdout.flush() root_folder = storage.load() - from bkmk_objects import make_linear + from bkmk_objects import make_linear, break_tree make_linear(root_folder) objects = len(root_folder.linear) @@ -74,6 +74,8 @@ def run(): sys.stdout.flush() if changed: + break_tree(root_folder.linear) + del root_folder.linear storage.store(root_folder) if changed and report_stats: diff --git a/set-title-list.py b/set-title-list.py index d373984..5f9e613 100755 --- a/set-title-list.py +++ b/set-title-list.py @@ -10,7 +10,7 @@ import sys __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2003-2023 PhiloSoft Design" +__copyright__ = "Copyright (C) 2003-2024 PhiloSoft Design" __license__ = "GNU GPL" @@ -30,7 +30,7 @@ def run(): if report_stats: print("Broytman set-title-list, Copyright (C)" - " 2003-2023 PhiloSoft Design") + " 2003-2024 PhiloSoft Design") if len(args) != 1: sys.stderr.write("Usage: set-title-list [-s] title_list_file\n") @@ -112,6 +112,7 @@ def run(): if changed: break_tree(root_folder.linear) + del root_folder.linear storage.store(root_folder) if changed and report_stats: diff --git a/set-urls.py b/set-urls.py index b897078..9a108da 100755 --- a/set-urls.py +++ b/set-urls.py @@ -113,6 +113,7 @@ def run(): if changed: break_tree(root_folder.linear) + del root_folder.linear storage.store(root_folder) if changed and report_stats: