good stuff

This commit is contained in:
ed 2021-12-10 02:21:56 +01:00
parent b2de1459b6
commit 50d8ff95ae
3 changed files with 18 additions and 4 deletions

View File

@ -1367,6 +1367,9 @@ class HttpCli(object):
try: try:
fs_path = req_path + ext fs_path = req_path + ext
st = bos.stat(fs_path) st = bos.stat(fs_path)
if stat.S_ISDIR(st.st_mode):
continue
file_ts = max(file_ts, st.st_mtime) file_ts = max(file_ts, st.st_mtime)
editions[ext or "plain"] = [fs_path, st.st_size] editions[ext or "plain"] = [fs_path, st.st_size]
except: except:
@ -1959,6 +1962,13 @@ class HttpCli(object):
fmt = "{{}} {{:{},}} {{}}" fmt = "{{}} {{:{},}} {{}}"
nfmt = "{:,}" nfmt = "{:,}"
for x in dirs:
n = x["name"] + "/"
if arg == "v":
n = "\033[94m" + n
x["name"] = n
fmt = fmt.format(len(nfmt.format(biggest))) fmt = fmt.format(len(nfmt.format(biggest)))
ret = [ ret = [
"# {}: {}".format(x, ls[x]) "# {}: {}".format(x, ls[x])

View File

@ -77,6 +77,9 @@ class TcpSrv(object):
if "pub" in title_vars and "external" in unicode(desc): if "pub" in title_vars and "external" in unicode(desc):
hits.append(("pub", ep)) hits.append(("pub", ep))
if "pub" in title_vars or "all" in title_vars:
hits.append(("all", ep))
for var in title_vars: for var in title_vars:
if var.startswith("ip-") and ep.startswith(var[3:]): if var.startswith("ip-") and ep.startswith(var[3:]):
hits.append((var, ep)) hits.append((var, ep))
@ -262,8 +265,8 @@ class TcpSrv(object):
return eps return eps
def _set_wintitle(self, vars): def _set_wintitle(self, vars):
if "pub" not in vars: vars["all"] = vars.get("all", {"Local-Only": 1})
vars["pub"] = {"Local-Only": 1} vars["pub"] = vars.get("pub", vars["all"])
vars2 = {} vars2 = {}
for k, eps in vars.items(): for k, eps in vars.items():

View File

@ -1485,7 +1485,8 @@ function up2k_init(subtle) {
err.indexOf('NotFoundError') !== -1 // macos-firefox permissions err.indexOf('NotFoundError') !== -1 // macos-firefox permissions
) { ) {
pvis.seth(t.n, 1, 'OS-error'); pvis.seth(t.n, 1, 'OS-error');
pvis.seth(t.n, 2, err); pvis.seth(t.n, 2, err + ' @ ' + car);
console.log('OS-error', reader.error, '@', car);
handled = true; handled = true;
} }
@ -2113,7 +2114,7 @@ function up2k_init(subtle) {
if (parallel_uploads < 1) if (parallel_uploads < 1)
bumpthread(1); bumpthread(1);
return { "init_deps": init_deps, "set_fsearch": set_fsearch, "ui": pvis } return { "init_deps": init_deps, "set_fsearch": set_fsearch, "ui": pvis, "st": st, "uc": uc }
} }