kopia lustrzana https://github.com/c9/core
Adding client side logs around saving to determine if we're somehow failing to save to disk correctly
rodzic
31d92edd1b
commit
e2541f62cf
|
@ -67,7 +67,7 @@
|
|||
"c9.ide.language.javascript.infer": "#325ac6880e",
|
||||
"c9.ide.language.jsonalyzer": "#4b329741b1",
|
||||
"c9.ide.language.codeintel": "#046d39603b",
|
||||
"c9.ide.collab": "#11a0d3c5ce",
|
||||
"c9.ide.collab": "#7e6b7225f3",
|
||||
"c9.ide.local": "#10eb45842a",
|
||||
"c9.ide.find": "#e33fbaed2f",
|
||||
"c9.ide.find.infiles": "#c0a13737ef",
|
||||
|
@ -108,7 +108,7 @@
|
|||
"c9.ide.run": "#485f06bd22",
|
||||
"c9.ide.run.build": "#0598fff697",
|
||||
"c9.ide.run.debug.xdebug": "#9956689819",
|
||||
"c9.ide.save": "#4cda35bfdb",
|
||||
"c9.ide.save": "#8219605f37",
|
||||
"c9.ide.scm": "#dc87315012",
|
||||
"c9.ide.terminal.monitor": "#1a4092ede2",
|
||||
"c9.ide.test": "#a282ec1619",
|
||||
|
|
|
@ -33,6 +33,8 @@ return function(vfs, base, baseProc, cli) {
|
|||
if (encoding)
|
||||
options.encoding = encoding;
|
||||
|
||||
console.log("[vfs.stream] Reading file " + path);
|
||||
|
||||
vfs.readfile(resolvePath(path), options, function(err, meta) {
|
||||
if (err)
|
||||
return callback(err);
|
||||
|
@ -70,6 +72,8 @@ return function(vfs, base, baseProc, cli) {
|
|||
var stream = options.stream = new Stream();
|
||||
stream.readable = true;
|
||||
|
||||
console.log("[vfs.stream] Writing file " + path);
|
||||
|
||||
vfs.mkfile(resolvePath(path), options, function(err, meta) {
|
||||
if (err)
|
||||
return callback(err);
|
||||
|
|
|
@ -4,6 +4,7 @@ define(function (require, exports, module) {
|
|||
return function(_request) {
|
||||
|
||||
function request(method, path, body, callback, progress, sync, headers) {
|
||||
// This goes to rest() function in vfs_client.js
|
||||
return _request(path, {
|
||||
method: method,
|
||||
body: body,
|
||||
|
@ -31,6 +32,8 @@ return function(_request) {
|
|||
return callback(err);
|
||||
}
|
||||
|
||||
console.log("[vfs.xhr] Reading file " + path);
|
||||
|
||||
var headers = metadata ? { "x-request-metadata" : "true" } : null;
|
||||
return request("GET", path, "", function(err, data, res) {
|
||||
if (err)
|
||||
|
@ -77,6 +80,8 @@ return function(_request) {
|
|||
// It would then be interpreted as a directory
|
||||
if (path.substr(-1) == "/")
|
||||
path = path.substr(0, path.length - 1);
|
||||
|
||||
console.log("[vfs.xhr] Writing file " + path);
|
||||
|
||||
return request("PUT", path, data, callback, progress, sync);
|
||||
}
|
||||
|
|
|
@ -146,6 +146,7 @@ define(function(require, exports, module) {
|
|||
|
||||
function rest(path, options, callback) {
|
||||
if (!vfs || !connection || connection.readyState != "open") {
|
||||
console.error("[vfs-client] Cannot perform rest action for ", path, " vfs is disconnected");
|
||||
var stub = { abort: function(){ buffer[this.id]= null; } };
|
||||
stub.id = buffer.push([path, options, callback, stub]) - 1;
|
||||
return stub;
|
||||
|
|
Ładowanie…
Reference in New Issue