kopia lustrzana https://github.com/c9/core
Merge pull request +6757 from c9/fix/collab
fix +5962 Cloned tab goes out of syncpull/51/merge
commit
619ef87c5d
|
@ -11,7 +11,7 @@ define(function(require, exports, module) {
|
|||
function main(options, imports, register) {
|
||||
var c9 = imports.c9;
|
||||
var Plugin = imports.Plugin;
|
||||
var _ = require("lodash");
|
||||
var normalize = require("path").normalize;
|
||||
|
||||
var plugin = new Plugin("Ajax.org", main.consumes);
|
||||
|
||||
|
@ -270,7 +270,7 @@ define(function(require, exports, module) {
|
|||
var reHome = new RegExp("^" + plugin.escapeRegExp(c9.home || "/home/ubuntu"));
|
||||
plugin.normalizePath = function(path){
|
||||
if (!path || path.charAt(0) == "~") return path;
|
||||
return (path.replace(/^[\/]+/, "/")).replace(reHome, "~");
|
||||
return normalize(path.replace(reHome, "~"));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -64,7 +64,7 @@ define(function(require, exports, module) {
|
|||
throw new Error("Missing callback for " + name);
|
||||
|
||||
if (!/^[!~/]/.test(path)) {
|
||||
var e = new Error("Invalid path passed to fs");
|
||||
var e = new Error("Invalid path passed to fs " + name);
|
||||
e.data = { name: name, path: path };
|
||||
setTimeout(function() { throw e });
|
||||
return args[args.length - 1](e);
|
||||
|
|
|
@ -1004,6 +1004,11 @@ define(function(require, module, exports) {
|
|||
&& t.document.title === options.title));
|
||||
})[0]);
|
||||
|
||||
// prevent opening of same tab twice in non cloned mode
|
||||
// TODO move cloning into ace?
|
||||
if (!tab)
|
||||
tab = findTab(path);
|
||||
|
||||
// Clone Tab
|
||||
if (((options.document || 0).meta || 0).cloned) {
|
||||
if (!tab) {
|
||||
|
|
Ładowanie…
Reference in New Issue