mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
up2k-ui: survive hitting inaccessible subfolders
This commit is contained in:
parent
304e053155
commit
9638267b4c
|
@ -1124,7 +1124,7 @@ function up2k_init(subtle) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var wi = fobj.webkitGetAsEntry();
|
var wi = fobj.getAsEntry ? fobj.getAsEntry() : fobj.webkitGetAsEntry();
|
||||||
if (wi.isDirectory) {
|
if (wi.isDirectory) {
|
||||||
dirs.push(wi);
|
dirs.push(wi);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1206,7 +1206,7 @@ function up2k_init(subtle) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var name = dn.fullPath;
|
var name = dn.fullPath;
|
||||||
if (name.indexOf('/') === 0)
|
if (name.startsWith('/'))
|
||||||
name = name.slice(1);
|
name = name.slice(1);
|
||||||
|
|
||||||
pf.push(name);
|
pf.push(name);
|
||||||
|
@ -1229,7 +1229,16 @@ function up2k_init(subtle) {
|
||||||
dirs.shift();
|
dirs.shift();
|
||||||
rd = null;
|
rd = null;
|
||||||
}
|
}
|
||||||
return read_dirs(rd, pf, dirs, good, nil, bad, spins);
|
read_dirs(rd, pf, dirs, good, nil, bad, spins);
|
||||||
|
}, function () {
|
||||||
|
var dn = dirs[0],
|
||||||
|
name = dn.fullPath;
|
||||||
|
|
||||||
|
if (name.startsWith('/'))
|
||||||
|
name = name.slice(1);
|
||||||
|
|
||||||
|
bad.push([dn, name]);
|
||||||
|
read_dirs(null, pf, dirs.slice(1), good, nil, bad, spins);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue