mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge remote-tracking branch 'origin/master' into mbed-auth-fix
Conflicts: node_modules/c9/urls.js
This commit is contained in:
commit
f10962a47c
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "c9",
|
||||
"description": "New Cloud9 Client",
|
||||
"version": "3.1.1102",
|
||||
"version": "3.1.1108",
|
||||
"author": "Ajax.org B.V. <info@ajax.org>",
|
||||
"private": true,
|
||||
"main": "bin/c9",
|
||||
@ -56,7 +56,7 @@
|
||||
"c9"
|
||||
],
|
||||
"c9plugins": {
|
||||
"c9.ide.language": "#b8d1c20dab",
|
||||
"c9.ide.language": "#c1cdf70cf0",
|
||||
"c9.ide.language.css": "#be07d72209",
|
||||
"c9.ide.language.generic": "#7a1150bc50",
|
||||
"c9.ide.language.html": "#9be847c0ce",
|
||||
@ -81,7 +81,7 @@
|
||||
"c9.ide.ace.split": "#0ae0151c78",
|
||||
"c9.ide.ace.statusbar": "#3aab0b67e0",
|
||||
"c9.ide.ace.stripws": "#cf0f42ac59",
|
||||
"c9.ide.behaviors": "#5ae88f87e1",
|
||||
"c9.ide.behaviors": "#db32109ebc",
|
||||
"c9.ide.closeconfirmation": "#cee4674141",
|
||||
"c9.ide.configuration": "#a9066299a2",
|
||||
"c9.ide.dialog.wizard": "#7667ec79a8",
|
||||
@ -96,7 +96,7 @@
|
||||
"c9.ide.mount": "#915b3d20be",
|
||||
"c9.ide.navigate": "#38ae100ea1",
|
||||
"c9.ide.newresource": "#981a408a7b",
|
||||
"c9.ide.openfiles": "#7fa4a97fed",
|
||||
"c9.ide.openfiles": "#358ac94915",
|
||||
"c9.ide.preview": "#8f87ff2f6a",
|
||||
"c9.ide.preview.browser": "#c5b9a129de",
|
||||
"c9.ide.preview.markdown": "#bc846e1562",
|
||||
|
||||
@ -216,7 +216,7 @@ define(function(require, exports, module) {
|
||||
: (linkInfo
|
||||
? { link: true, linkStat: { fullPath: linkInfo } }
|
||||
: {});
|
||||
stat.mtime = Math.floor(Date.now() / 1000);
|
||||
stat.mtime = Date.now();
|
||||
node = createNode(e.path, stat);
|
||||
|
||||
emit("add", {path : e.path, node : node});
|
||||
@ -464,15 +464,30 @@ define(function(require, exports, module) {
|
||||
var parts = path.split("/");
|
||||
var node = context || model.root;
|
||||
if (!node) {
|
||||
node = orphans[parts[0]]; //model.realRoot ||
|
||||
node = orphans[parts[0]]; // model.realRoot ||
|
||||
if (node) parts.shift();
|
||||
}
|
||||
|
||||
if (path == "/") parts.shift();
|
||||
|
||||
var up = 0;
|
||||
for (var i = parts.length; i--;) {
|
||||
var p = parts[i];
|
||||
if (!p && i || p === ".") {
|
||||
parts.splice(i, 1);
|
||||
}
|
||||
else if (p === "..") {
|
||||
parts.splice(i, 1);
|
||||
up++;
|
||||
}
|
||||
else if (up) {
|
||||
parts.splice(i, 1);
|
||||
up--;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var p = parts[i];
|
||||
if (!p && i) continue; // allow paths with trailing /
|
||||
if (node)
|
||||
node = node.map && node.map[p];
|
||||
if (!node)
|
||||
@ -579,6 +594,14 @@ define(function(require, exports, module) {
|
||||
|
||||
node.children = null;
|
||||
|
||||
if (typeof node.mtime !== "number" && node.mtime) {
|
||||
// why Date ends up here?
|
||||
reportError(new Error("Date in fs cache"), {
|
||||
stat: stat,
|
||||
mtime: node.mtime,
|
||||
path: node.path
|
||||
});
|
||||
}
|
||||
if (!updating) {
|
||||
if (!modified.length)
|
||||
modified.push(parent);
|
||||
@ -629,14 +652,6 @@ define(function(require, exports, module) {
|
||||
});
|
||||
} else if (key === "children" || key === "isSelected") {
|
||||
prop = null;
|
||||
} else if (Object.prototype.toString.call(node[key]) == "[object Date]") {
|
||||
// why Date ends up here?
|
||||
reportError(new Error("Date in fs cache"), {
|
||||
key: key,
|
||||
value: node[key],
|
||||
path: node.path,
|
||||
hasParentProp: !!node.parent,
|
||||
});
|
||||
} else {
|
||||
prop = lang.deepCopy(node[key]);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ define(function(require, exports, module) {
|
||||
var stream = require("./fs.streams")(vfs, options.base, options.baseProc, options.cli);
|
||||
var xhr = options.cli ? stream : require("./fs.xhr")(vfs.rest);
|
||||
var uCaseFirst = require("c9/string").uCaseFirst;
|
||||
var normalize = require("path").normalize;
|
||||
|
||||
var api = {
|
||||
readFile: xhr.readFile,
|
||||
@ -65,6 +66,11 @@ define(function(require, exports, module) {
|
||||
if (typeof args[args.length - 1] != "function")
|
||||
throw new Error("Missing callback for " + name);
|
||||
|
||||
path = args[0] = normalize(path);
|
||||
if (name == "rename" || name == "copy" || name == "symlink") {
|
||||
args[1] = normalize(args[1]);
|
||||
}
|
||||
|
||||
// // TODO disabled to not break local version on windows
|
||||
// if (!/^[!~/]/.test(path)) {
|
||||
// var e = new Error("Invalid path passed to fs " + name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user