OSDN Git Service

Add deletion of files in res for security enhancement.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / NeverNote.java
index 988ae34..c503d64 100644 (file)
@@ -986,6 +986,12 @@ public class NeverNote extends QMainWindow{
                if (decryptOnShutdown) {
                        decryptOnShutdown();
                }
+               try {
+                       Global.getFileManager().purgeResDirectory(false);
+               } catch (InitializationException e) {
+                       System.out.println(tr("Empty res directory purge failed"));
+                       e.printStackTrace();
+               }
                logger.log(logger.HIGH, "Leaving NeverNote.closeEvent");
        }
 
@@ -5415,7 +5421,7 @@ public class NeverNote extends QMainWindow{
                
        ImportData noteReader = new ImportData(conn, false);
        String fileName = fd.selectedFiles().get(0);
-       saveLastPath.substring(0,fileName.lastIndexOf("/"));
+//     saveLastPath.substring(0,fileName.lastIndexOf("/"));
 
        if (!fileName.endsWith(".nnex"))
                fileName = fileName +".nnex";