[Pkg-mozext-commits] [greasemonkey] 31/41: Clean up stray temp directories at launch.
David Prévot
taffit at moszumanska.debian.org
Thu Apr 30 22:06:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 05eeebc46a3c14da06f526135c3f77f6fcf23037
Author: Anthony Lieuallen <arantius at gmail.com>
Date: Wed Apr 22 16:40:04 2015 -0400
Clean up stray temp directories at launch.
Fixes #2069
---
content/config.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/content/config.js b/content/config.js
index 048e792..6b19aeb 100644
--- a/content/config.js
+++ b/content/config.js
@@ -288,5 +288,23 @@ Config.prototype._updateVersion = function() {
chromeWin.setTimeout(chromeWin.GM_BrowserUI.openTab, 100, url);
}
}
+
+ if ('3.2' == newVersion && oldVersion != newVersion) {
+ const tmp_dir = Components
+ .classes['@mozilla.org/file/directory_service;1']
+ .getService(Components.interfaces.nsIProperties)
+ .get('TmpD', Components.interfaces.nsIFile);
+ // #2069 Clean up stray temp directories.
+ for (var i = 1; ; i++) {
+ var file = tmp_dir.clone();
+ file.append('gm-temp' + i);
+ if (file.exists()) {
+ dump('Removing temp dir: ' + file.path + '\n');
+ file.remove(true);
+ } else {
+ break;
+ }
+ }
+ }
}));
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list