From 8f8e263977cc356bf754236ed0182515b26337ca Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 30 Oct 2013 11:06:27 -0400
Subject: [PATCH] CS fixes

---
 program/js/app.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 42cbaa6..55dea36 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3032,9 +3032,12 @@
   // test if purge command is allowed
   this.purge_mailbox_test = function()
   {
-    return (this.env.exists && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox
-      || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter))
-      || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter))));
+    return (this.env.exists && (
+      this.env.mailbox == this.env.trash_mailbox
+      || this.env.mailbox == this.env.junk_mailbox
+      || this.env.mailbox.indexOf(this.env.trash_mailbox + this.env.delimiter) == 0
+      || this.env.mailbox.indexOf(this.env.junk_mailbox + this.env.delimiter) == 0
+    ));
   };
 
 

--
Gitblit v1.9.1