|
@@ -203,10 +203,10 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
private void OpenSetPasswordDialog()
|
|
|
{
|
|
|
VerifyPasswordResult result = SecurityHelper.VerifyPasswordByPasswordKind(PDFViewer.Document, EnumPasswordKind.StatusPermissionsPassword, dialogs);
|
|
|
- if (result.IsDiscryptied)
|
|
|
- {
|
|
|
|
|
|
- if (result.Password != null || !viewContentViewModel.SecurityInfo.IsPasswordChanged)
|
|
|
+ if (result.IsDiscryptied)
|
|
|
+ {
|
|
|
+ if ((result.Password != null || !viewContentViewModel.SecurityInfo.IsPasswordChanged)&&!string.IsNullOrEmpty(PDFViewer.Document.FilePath))
|
|
|
{
|
|
|
string filePath = PDFViewer.Document.FilePath;
|
|
|
PDFViewer.CloseDocument();
|