зеркало из https://github.com/mozilla/brackets.git
Merge pull request #371 from humphd/thimble620
Fix https://github.com/mozilla/thimble.webmaker.org/issues/620 - Remember last-open-file within subdirs
This commit is contained in:
Коммит
922b3a0353
|
@ -190,7 +190,7 @@ define(function (require, exports, module) {
|
||||||
// XXXBramble: get path passed into iframe from hosting app
|
// XXXBramble: get path passed into iframe from hosting app
|
||||||
ProjectManager.openProject(BrambleStartupState.project("root")).always(function () {
|
ProjectManager.openProject(BrambleStartupState.project("root")).always(function () {
|
||||||
var deferred = new $.Deferred();
|
var deferred = new $.Deferred();
|
||||||
FileSystem.resolve(BrambleStartupState.project("fullPath"), function (err, file) {
|
FileSystem.resolve(BrambleStartupState.project("filename"), function (err, file) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
var promise = CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: file.fullPath });
|
var promise = CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: file.fullPath });
|
||||||
promise.then(deferred.resolve, deferred.reject);
|
promise.then(deferred.resolve, deferred.reject);
|
||||||
|
|
|
@ -319,12 +319,7 @@ define([
|
||||||
setReadyState(Bramble.MOUNTING);
|
setReadyState(Bramble.MOUNTING);
|
||||||
|
|
||||||
root = Path.normalize(root);
|
root = Path.normalize(root);
|
||||||
filename = filename || (_state.filename || "index.html");
|
filename = Path.resolve(root, filename || (_state.fullPath || "index.html"));
|
||||||
|
|
||||||
if (Path.isAbsolute(filename)) {
|
|
||||||
filename = Path.relative(root, filename);
|
|
||||||
debug("converted absolute filename path in mount() to relative", filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure the path we were given exists in the filesystem, and is a dir
|
// Make sure the path we were given exists in the filesystem, and is a dir
|
||||||
_fs.stat(root, function(err, stats) {
|
_fs.stat(root, function(err, stats) {
|
||||||
|
|
|
@ -205,8 +205,7 @@ define(function (require, exports, module) {
|
||||||
// to Brackets that it can keep going, which will pick this up.
|
// to Brackets that it can keep going, which will pick this up.
|
||||||
BrambleStartupState.project.init({
|
BrambleStartupState.project.init({
|
||||||
root: data.mount.root,
|
root: data.mount.root,
|
||||||
filename: data.mount.filename,
|
filename: data.mount.filename
|
||||||
fullPath: Path.join(data.mount.root, data.mount.filename)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set initial UI state values (if present)
|
// Set initial UI state values (if present)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче