Explorar o código

安全 - 删除临时文件

liuaoran %!s(int64=2) %!d(string=hai) anos
pai
achega
58a947ba93
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      PDF Office/ViewModels/ViewContentViewModel.cs

+ 2 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -1963,7 +1963,7 @@ namespace PDF_Office.ViewModels
                         PDFViewer.Document.WriteToFilePath(currentPath);
                         PDFViewer.CloseDocument();
                         PDFViewer.InitDocument(currentPath);
-                        //System.IO.File.Delete(tempPath);
+                        System.IO.File.Delete(tempPath);
 
                         if (!string.IsNullOrEmpty(permissionsPassword))
                         {
@@ -2002,6 +2002,7 @@ namespace PDF_Office.ViewModels
                         PDFViewer.CloseDocument();
                         PDFViewer.InitDocument(currentPath);
                         PDFViewer.Load();
+                        System.IO.File.Delete(tempPath);
                     }
                     catch
                     {