From 964cb79d0c81115ec86c63308a385aada44bd3b2 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sat, 29 Mar 2025 20:53:18 +0000 Subject: [PATCH] Fix: Remove automatic deletion of files - watch script should only log deletion events --- src/watch_voice_memos.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/watch_voice_memos.py b/src/watch_voice_memos.py index f9da774..e9725f7 100755 --- a/src/watch_voice_memos.py +++ b/src/watch_voice_memos.py @@ -59,25 +59,12 @@ class VoiceMemoHandler(FileSystemEventHandler): # Handle deleted voice memo if file_path.parent == self.voice_memo_dir and file_path.suffix.lower() == '.m4a': print(f"\nVoice memo deleted: {file_path.name}") - # Delete corresponding transcript and summary if they exist - transcript_file = self.transcript_dir / f"{file_path.stem}.txt" - summary_file = self.summary_dir / f"{file_path.stem}_summary.txt" - - if transcript_file.exists(): - transcript_file.unlink() - print(f" Deleted corresponding transcript: {transcript_file.name}") - if summary_file.exists(): - summary_file.unlink() - print(f" Deleted corresponding summary: {summary_file.name}") + print(" Note: Corresponding transcript and summary files remain unchanged") # Handle deleted transcript elif file_path.parent == self.transcript_dir and file_path.suffix.lower() == '.txt': print(f"\nTranscript deleted: {file_path.name}") - # Delete corresponding summary if it exists - summary_file = self.summary_dir / f"{file_path.stem}_summary.txt" - if summary_file.exists(): - summary_file.unlink() - print(f" Deleted corresponding summary: {summary_file.name}") + print(" Note: Corresponding summary file remains unchanged") # Handle deleted summary elif file_path.parent == self.summary_dir and file_path.suffix.lower() == '.txt':