Use the just-loaded project settings for blacklist generation instead of relying on Settings.
This fixes #470, or at least makes it less ambiguous. It's not entirely clear where the race condition was causing the settings to contain bad results, but this fixes the problem.
This commit is contained in:
parent
43a6eb362d
commit
74d33a4238
2 changed files with 5 additions and 4 deletions
|
@ -163,8 +163,9 @@ define([
|
|||
});
|
||||
};
|
||||
|
||||
var blacklistRegExp = function() {
|
||||
var blacklist = Settings.get("user").ignoreFiles;
|
||||
var blacklistRegExp = function(config) {
|
||||
//avoid race condition when reloading
|
||||
var blacklist = (config || Settings.get("user")).ignoreFiles;
|
||||
if (blacklist) {
|
||||
return new RegExp(blacklist);
|
||||
}
|
||||
|
@ -453,7 +454,7 @@ define([
|
|||
this.element.addClass("loading");
|
||||
//restore directory entries that can be restored
|
||||
this.directories = [];
|
||||
blacklist = blacklistRegExp();
|
||||
blacklist = blacklistRegExp(project.settings);
|
||||
M.map(
|
||||
project.folders,
|
||||
function(folder, index, c) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Caret",
|
||||
"description": "Professional text editing for Chrome and Chrome OS",
|
||||
"version": "1.6.1",
|
||||
"version": "1.6.2",
|
||||
"manifest_version": 2,
|
||||
"default_locale": "en",
|
||||
"icons": {
|
||||
|
|
Loading…
Reference in a new issue