Don't remove migrated read-only pads
parent
e110f20397
commit
8eccffd8e4
|
@ -563,6 +563,7 @@ define([
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Clean missing href
|
// Clean missing href
|
||||||
|
if (el.href) {
|
||||||
if (!el.href) {
|
if (!el.href) {
|
||||||
debug("Removing an element in filesData with a missing href.", el);
|
debug("Removing an element in filesData with a missing href.", el);
|
||||||
toClean.push(id);
|
toClean.push(id);
|
||||||
|
@ -582,15 +583,20 @@ define([
|
||||||
toClean.push(id);
|
toClean.push(id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
} else if (!el.roHref) {
|
||||||
|
debug("Removing an element in filesData with a missing href.", el);
|
||||||
|
toClean.push(id);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Fix href
|
// Fix href
|
||||||
if (/^https*:\/\//.test(el.href)) { el.href = Hash.getRelativeHref(el.href); }
|
if (el.href && /^https*:\/\//.test(el.href)) { el.href = Hash.getRelativeHref(el.href); }
|
||||||
// Fix creation time
|
// Fix creation time
|
||||||
if (!el.ctime) { el.ctime = el.atime; }
|
if (!el.ctime) { el.ctime = el.atime; }
|
||||||
// Fix title
|
// Fix title
|
||||||
if (!el.title) { el.title = Hash.getDefaultName(parsed); }
|
if (!el.title) { el.title = Hash.getDefaultName(parsed); }
|
||||||
// Fix channel
|
// Fix channel
|
||||||
if (!el.channel) {
|
if (el.href && !el.channel) {
|
||||||
try {
|
try {
|
||||||
var secret = Hash.getSecrets(parsed.type, parsed.hash, el.password);
|
var secret = Hash.getSecrets(parsed.type, parsed.hash, el.password);
|
||||||
el.channel = secret.channel;
|
el.channel = secret.channel;
|
||||||
|
|
|
@ -1367,6 +1367,10 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var element = filesOp.find(newPath);
|
var element = filesOp.find(newPath);
|
||||||
|
if (!isFolder) {
|
||||||
|
var data = filesOp.getFileData(element);
|
||||||
|
if (!data.href) { return; }
|
||||||
|
}
|
||||||
var $icon = !isFolder ? getFileIcon(element) : undefined;
|
var $icon = !isFolder ? getFileIcon(element) : undefined;
|
||||||
var ro = filesOp.isReadOnlyFile(element);
|
var ro = filesOp.isReadOnlyFile(element);
|
||||||
// ro undefined means it's an old hash which doesn't support read-only
|
// ro undefined means it's an old hash which doesn't support read-only
|
||||||
|
@ -2424,6 +2428,7 @@ define([
|
||||||
sortedFiles.forEach(function (key) {
|
sortedFiles.forEach(function (key) {
|
||||||
if (filesOp.isFolder(root[key])) { return; }
|
if (filesOp.isFolder(root[key])) { return; }
|
||||||
var $element = createElement(path, key, root, false);
|
var $element = createElement(path, key, root, false);
|
||||||
|
if (!$element) { return; }
|
||||||
$element.appendTo($list);
|
$element.appendTo($list);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue