diff --git a/copyparty/star.py b/copyparty/star.py index d771a1c6..b560f9d5 100644 --- a/copyparty/star.py +++ b/copyparty/star.py @@ -5,7 +5,7 @@ import tarfile import threading from .sutil import errdesc -from .util import Queue, fsenc +from .util import Queue, fsenc, min_ex from .bos import bos @@ -88,8 +88,9 @@ class StreamTar(object): try: self.ser(f) - except Exception as ex: - errors.append([f["vp"], repr(ex)]) + except Exception: + ex = min_ex(5, True).replace("\n", "\n-- ") + errors.append([f["vp"], ex]) if errors: self.errf, txt = errdesc(errors) diff --git a/copyparty/szip.py b/copyparty/szip.py index 1859e91b..8e18eace 100644 --- a/copyparty/szip.py +++ b/copyparty/szip.py @@ -1,13 +1,12 @@ # coding: utf-8 from __future__ import print_function, unicode_literals -import os import time import zlib from datetime import datetime from .sutil import errdesc -from .util import yieldfile, sanitize_fn, spack, sunpack +from .util import yieldfile, sanitize_fn, spack, sunpack, min_ex from .bos import bos @@ -36,7 +35,10 @@ def unixtime2dos(ts): bd = ((dy - 1980) << 9) + (dm << 5) + dd bt = (th << 11) + (tm << 5) + ts // 2 - return spack(b"