Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#453 Encrypted file deleted when clicking Cancel

1.7.2126
open
nobody
None
5
2014-03-04
2013-12-06
Nestor Burma
No

when trying to encrypt as 'self-extract" a file that has already been encrypted as a "self-extract" file then:
- clicking "Save" in the "Save As" window
- and answering "Yes" in the "Confirm Save As" box
- and now clicking "Cancel" in the "AxCrypt" window
will result in having the already existing encrypted "self-extract" file deleted!
The all idea of the final "AxCrypt" dialog box before starting the encryption is to decide:
- to proceed with the encryption by entering a passphrase and pressing OK, or
- to cancel the operation
When pressing "Cancel" in the "AxCrypt" dialog box no passphrase has been entered yet and the encryption process consequently could not has yet started. Then pressing "Cancel" shall NOT result in doing anything and certainly not deleting the already existing encrypted file.
It defeats the basic principle of having a cancel procedure.

Discussion

  • Kob
    Kob
    2014-03-03

    I tested out the procedure you outlined above with V.1.7.2687 and yes, I saw what you saw.
    Technically speaking, the instant you confirmed the "Save As.." overwrite, the old encrypted exe file is not yours anymore - it's the system's. The "Cancel" afterward is just to disapprove the encryption of the new exe copy - which already took the place of the old exe, and was deleted upon the "cancel" since it was not allowed to be encrypted.

    BUT, the final outcome from a user point of view is data loss - and this is a bad thing. A simple code fix would be, instead of navigating through the logic when to delete a file and when not, is to check the existence of a-same-name.exe and instead of "Save As" to always use "Save" with a name modifier for the new encrypted exe - e.g. a-same-name(1).exe

     
  • I agree with both comments in the sense that a data loss should not happen until the very last instant. Then again, the whole "decrypt to exe" will be obsoleted by AxCrypt 2.x which will not support this at all, but instead will support a full-featured (except explorer integration) AxCrypt without installation.