Revision: 3793
Author:   seba.wagner
Date:     Fri Jun 10 06:55:22 2011
Log:      FixExport: Delete of temp files
http://code.google.com/p/openmeetings/source/detail?r=3793

Modified:
/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupExport.java

=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupExport.java Fri Jun 10 06:19:18 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupExport.java Fri Jun 10 06:55:22 2011
@@ -422,6 +422,13 @@

                                        out.flush();
                                        out.close();
+
+                                       File backupFile = new File(full_path);
+
+                                       if (backupFile.exists()) {
+                                               //log.debug("DELETE :1: 
"+backupFile.getAbsolutePath());
+                                               backupFile.delete();
+                                       }

                                        this.deleteDirectory(backup_dirFile);

@@ -437,6 +444,9 @@
        }

        public boolean deleteDirectory(File path) throws IOException {
+
+               //log.debug("deleteDirectory :: "+path);
+
                if (path.exists()) {
                        File[] files = path.listFiles();
                        for (int i = 0; i < files.length; i++) {
@@ -447,6 +457,9 @@
                                }
                        }
                }
+
+               //log.debug("DELETE :3: "+path.getAbsolutePath());
+
                return (path.delete());
        }

@@ -1249,6 +1262,8 @@
                XMLWriter writer = new XMLWriter(out, outformat);
                writer.write(doc);
                writer.flush();
+               writer.close();
+               out.close();
        }


--
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en.

Reply via email to