BrowserWindow.vala
[app.webkitpdf] / BrowserWindow.vala
index fc7919d..37da82f 100644 (file)
@@ -76,12 +76,7 @@ public class BrowserWindow : Object
                 if (scheme=="https") {
                     ssl="TRUE";
                 }                
-                try {
-                         //FileIOStream iostream;
-                             
-                    //File file = File.new_tmp ("cookie-XXXXXX.txt", out iostream);
-                             //print("cookie tmp file name: %s\n", file.get_path ());
-
+                try {                   
                              OutputStream ostream = iostream.output_stream;
                              DataOutputStream dostream = new DataOutputStream (ostream);                                            
                                             
@@ -120,6 +115,13 @@ public class BrowserWindow : Object
         
          });
                
+               try {
+                        print("deleting cookie tmp file name: %s\n", file.get_path ());
+                      file.delete ();
+             } catch (Error e) {
+                      stdout.printf ("Error: %s\n", e.message);
+             }
+
         
         });
     }