BrowserWindow.vala
authorKH Lau <khlau@roojs.com>
Thu, 8 Mar 2018 05:41:48 +0000 (13:41 +0800)
committerKH Lau <khlau@roojs.com>
Thu, 8 Mar 2018 05:41:48 +0000 (13:41 +0800)
BrowserWindow.vala

index 37da82f..3dcca14 100644 (file)
@@ -53,11 +53,7 @@ public class BrowserWindow : Object
             blog = r.replace(blog, blog.length, 0, ".blogspot.com/ncr/");
           }
          
-         FileIOStream iostream;
-                             
-         File file = File.new_tmp ("cookie-XXXXXX.txt", out iostream);
          
-         print("cookie tmp file name: %s\n", file.get_path ());
           
          if(webkitpdf.opt_cookies != null) {
             print("setting cookie %s\n",webkitpdf.opt_cookies);
@@ -76,7 +72,11 @@ public class BrowserWindow : Object
                 if (scheme=="https") {
                     ssl="TRUE";
                 }                
-                try {                   
+                try {            
+                    FileIOStream iostream;                           
+                    File file = File.new_tmp ("cookie-XXXXXX.txt", out iostream);        
+                    print("cookie tmp file name: %s\n", file.get_path ());
+                
                              OutputStream ostream = iostream.output_stream;
                              DataOutputStream dostream = new DataOutputStream (ostream);