Fix encryption to preserve original file extension

This commit is contained in:
MachinePainting
2026-02-22 21:23:44 -08:00
parent e010853747
commit c4ed0bccc2
2 changed files with 4 additions and 2 deletions
+3
View File
@@ -33,3 +33,6 @@ node_modules/
output/
temp/
logs/
# old backed up project archived files to ignore
_old/
+1 -2
View File
@@ -91,8 +91,7 @@ class FileEncryptHandler(FileSystemEventHandler):
file_data = f.read()
encrypted_data = fernet.encrypt(file_data)
base_name = os.path.splitext(file_path)[0]
enc_path = base_name + '.enc'
enc_path = file_path + '.enc'
with open(enc_path, 'wb') as f:
f.write(encrypted_data)
logger.info(f"Created encrypted file: {enc_path}")