diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index ee84d45e..1d0026a5 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -5269,10 +5269,11 @@ class HttpCli(object): fdone = max(0.001, 1 - rem) td = max(0.1, now - t0) rd, fn = vsplit(vp.replace(os.sep, "/")) - if not rd: - rd = "/" - erd = quotep(rd) - rds = rd.replace("/", " / ") + if rd: + rds = rd.replace("/", " / ") + erd = "/%s/" % (quotep(rd),) + else: + erd = rds = "/" spd = humansize(sz * fdone / td, True) + "/s" eta = s2hms((td / fdone) - td, True) if rem < 1 else "--" idle = s2hms(now - poke, True) @@ -5299,10 +5300,11 @@ class HttpCli(object): for t0, t1, sent, sz, vp, dl_id, uname in dl_list: td = max(0.1, now - t0) rd, fn = vsplit(vp) - if not rd: - rd = "/" - erd = quotep(rd) - rds = rd.replace("/", " / ") + if rd: + rds = rd.replace("/", " / ") + erd = "/%s/" % (quotep(rd),) + else: + erd = rds = "/" spd = humansize(sent / td, True) + "/s" hsent = humansize(sent, True) idle = s2hms(now - t1, True) diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index 848b8905..9b642b9b 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -42,7 +42,7 @@ %speedetaidledirfile {%- for u in ups %} - {{ u[0] }}{{ u[1] }}{{ u[2] }}{{ u[3] }}{{ u[5]|e }}{{ u[6]|e }} + {{ u[0] }}{{ u[1] }}{{ u[2] }}{{ u[3] }}{{ u[5]|e }}{{ u[6]|e }} {%- endfor %} @@ -54,7 +54,7 @@ %sentspeedetaidledirfile {%- for u in dls %} - {{ u[0] }}{{ u[1] }}{{ u[2] }}{{ u[3] }}{{ u[4] }}{{ u[5] }}{{ u[7]|e }}{{ u[8] }} + {{ u[0] }}{{ u[1] }}{{ u[2] }}{{ u[3] }}{{ u[4] }}{{ u[5] }}{{ u[7]|e }}{{ u[8] }} {%- endfor %}