Skip to content

Files encrypted before v1.0.3 lose original file extension on decryption #5

@machinepainting

Description

@machinepainting

Problem

Prior to v1.0.3, the encryption module stripped the original file extension before adding .enc. For example, image_00001.png was encrypted as image_00001.enc instead of image_00001.png.enc.

When decrypting these files, the output has no file extension (e.g., image_00001 instead of image_00001.png). The files are still valid — they just need the extension added back.

This is fixed in v1.0.3. New encrypted files preserve the original extension (image_00001.png.enc), and decryption correctly restores it (image_00001.png).

Workaround — Add the extension back manually

If you decrypted files before updating to v1.0.3 and they have no extension, follow the steps below for your platform.

macOS

  1. Open Automator (search in Spotlight)
  2. Select New Workflow
  3. Drag your extensionless files into the workflow
  4. Search for and add the Rename Finder Items action
  5. Choose Add Text
  6. In the Add field, type your file format (e.g., .png for images, .mp4 for videos)
  7. Select After Name in the dropdown
  8. Click Run

All files will have the extension added back.

Windows

  1. Place all extensionless files in one folder
  2. Open PowerShell and navigate to that folder
  3. Run the following command (replace .png with your file format):
Get-ChildItem -File | Where-Object { $_.Extension -eq '' } | Rename-Item -NewName { $_.Name + '.png' }

Linux

  1. Open a terminal and navigate to the folder with extensionless files
  2. Run the following command (replace .png with your file format):
for f in *; do [ -f "$f" ] && [ "${f##*.}" = "$f" ] && mv "$f" "$f.png"; done

Fix

Update to v1.0.3 or later. New encrypted files will preserve the original extension and decryption will work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions