From 21405c3fda572096eb3d74f510cfc4743f8cfded Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 27 Mar 2021 01:43:02 +0100 Subject: [PATCH] be nice to windows --- copyparty/szip.py | 6 ++++-- copyparty/web/md.html | 2 +- copyparty/web/util.js | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/copyparty/szip.py b/copyparty/szip.py index 42e0bcdd..90f8e3d4 100644 --- a/copyparty/szip.py +++ b/copyparty/szip.py @@ -3,7 +3,7 @@ import zlib import struct from datetime import datetime -from .util import yieldfile +from .util import yieldfile, sanitize_fn def dostime2unix(buf): @@ -84,7 +84,9 @@ def gen_hdr(h_pos, fn, sz, lastmod, utf8, crc32, pre_crc): vsz = 0xFFFFFFFF if z64 else sz ret += struct.pack(" - + {%- if edit %} diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 9b5cd1ce..e36cf05a 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -237,7 +237,10 @@ function goto(dest) { goto(); var op = sread('opmode'); if (op !== null && op !== '.') - goto(op); + try { + goto(op); + } + catch (ex) { } })();