mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Remove FileSystem.pathExists(). Fix a bunch of unit test failures.
This commit is contained in:
1 parent
9ffe75f0b6
commit
996ea0d724
11 files changed
+197
-145
No files matched your search
@@ -1542,21 +1542,25 @@ define(function (require, exports, module) {
|
||||
preferences;
|
||||
|
||||
function getPreferences(path) {
|
||||
var file = brackets.appFileSystem.getFileForPath(path);
|
||||
|
||||
preferences = null;
|
||||
|
||||
FileUtils.readAsText(file).done(function (text) {
|
||||
var configObj = null;
|
||||
try {
|
||||
configObj = JSON.parse(text);
|
||||
} catch (e) {
|
||||
// continue with null configObj
|
||||
console.log(e);
|
||||
brackets.appFileSystem.resolve(path, function (err, file) {
|
||||
if (!err) {
|
||||
FileUtils.readAsText(file).done(function (text) {
|
||||
var configObj = null;
|
||||
try {
|
||||
configObj = JSON.parse(text);
|
||||
} catch (e) {
|
||||
// continue with null configObj
|
||||
console.log(e);
|
||||
}
|
||||
preferences = new Preferences(configObj);
|
||||
}).fail(function (error) {
|
||||
preferences = new Preferences();
|
||||
});
|
||||
} else {
|
||||
preferences = new Preferences();
|
||||
}
|
||||
preferences = new Preferences(configObj);
|
||||
}).fail(function (error) {
|
||||
preferences = new Preferences();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user