mirror of
https://github.com/rfivet/uemacs.git
synced 2025-01-18 22:27:09 -05:00
Add CRYPT mode to buffer when doing a set-encryption-key on a buffer where the mode is not set yet.
This commit is contained in:
parent
8aeb526a2a
commit
e3d7efda7f
5
file.c
5
file.c
@ -19,6 +19,7 @@
|
||||
#include "buffer.h"
|
||||
#include "crypt.h"
|
||||
#include "defines.h"
|
||||
#include "display.h"
|
||||
#include "estruct.h"
|
||||
#include "execute.h"
|
||||
#include "fileio.h"
|
||||
@ -205,6 +206,10 @@ int set_encryption_key( int f, int n) {
|
||||
curbp->b_key[ sizeof( ekey_t) - 1] = '\0' ;
|
||||
free( key) ;
|
||||
cryptbufferkey( curbp) ;
|
||||
if( !(curbp->b_mode & MDCRYPT)) {
|
||||
curbp->b_mode |= MDCRYPT ;
|
||||
upmode() ;
|
||||
}
|
||||
|
||||
mloutstr( "") ; /* clear the message line */
|
||||
return TRUE ;
|
||||
|
Loading…
Reference in New Issue
Block a user