[or-cvs] r15633: Add some code to try to narrow in on a permisisons issue wit (torbutton/trunk/src/components)

mikeperry at seul.org mikeperry at seul.org
Thu Jul 3 21:55:47 UTC 2008


Author: mikeperry
Date: 2008-07-03 17:55:47 -0400 (Thu, 03 Jul 2008)
New Revision: 15633

Modified:
   torbutton/trunk/src/components/cookie-jar-selector.js
Log:

Add some code to try to narrow in on a permisisons issue with
Vista Roaming Profiles.



Modified: torbutton/trunk/src/components/cookie-jar-selector.js
===================================================================
--- torbutton/trunk/src/components/cookie-jar-selector.js	2008-07-03 19:00:23 UTC (rev 15632)
+++ torbutton/trunk/src/components/cookie-jar-selector.js	2008-07-03 21:55:47 UTC (rev 15633)
@@ -38,10 +38,21 @@
     var srcfile = getProfileFile(src);    
     var destfile = getProfileFile(dest);
     if (srcfile.exists()) {
-      if (destfile.exists()) {
-        destfile.remove(false);
+      // XXX: Permissions issue with Vista roaming profiles? 
+      // Maybe file locking?
+      // XXX: Hrmm... how to alert user?? They may never notice these messages..
+      try {
+          if (destfile.exists()) {
+              destfile.remove(false);
+          }
+      } catch(e) {
+          this.logger.log(4, "Cookie file deletion exception: "+e);
       }
-      srcfile.copyTo(null, dest);
+      try {
+          srcfile.copyTo(null, dest);
+      } catch(e) {
+          this.logger.log(5, "Cookie file copy exception: "+e);
+      }
     }
   };
 



More information about the tor-commits mailing list