From d25af5e71bcb75b4b4ba61d41c3e7655b9975a57 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 19 Dec 2024 18:01:33 -0600 Subject: [PATCH] fix: clean ftp copy of repository when cleaning repository (#8354) --- ietf/doc/expire.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/doc/expire.py b/ietf/doc/expire.py index 63955d091..57af2ad91 100644 --- a/ietf/doc/expire.py +++ b/ietf/doc/expire.py @@ -213,11 +213,11 @@ def clean_up_draft_files(): def move_file_to(subdir): # Similar to move_draft_files_to_archive - # ghostlinkd would keep this in the combined all archive since it would - # be sourced from a different place. But when ghostlinkd is removed, nothing - # new is needed here - the file will already exist in the combined archive shutil.move(path, os.path.join(settings.INTERNET_DRAFT_ARCHIVE_DIR, subdir, basename)) + mark = Path(settings.FTP_DIR) / "internet-drafts" / basename + if mark.exists(): + mark.unlink() try: doc = Document.objects.get(name=filename, rev=revision)