From f11de7259e82be09f13e69888529906cd4db25d0 Mon Sep 17 00:00:00 2001 From: benweet Date: Sun, 3 Nov 2013 11:37:55 +0000 Subject: [PATCH] Protect against multiple windows when delete a file from recovery --- public/recovery.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/recovery.html b/public/recovery.html index 9cf4d946..2a46d8fc 100644 --- a/public/recovery.html +++ b/public/recovery.html @@ -65,6 +65,8 @@ function removeFile(fileIndex) { var ok = confirm('Are you sure you want to remove "' + localStorage[fileIndex + '.title'] + '"?'); if(ok) { + // Protect against multiple windows + localStorage.removeItem('frontWindowId'); localStorage['file.list'] = localStorage['file.list'].replace(';' + fileIndex + ';', ';'); for (var key in localStorage){ key.indexOf(fileIndex) === 0 && localStorage.removeItem(key);