diff --git a/copyparty/__init__.py b/copyparty/__init__.py
index 0b0e5683..cf7e50f0 100644
--- a/copyparty/__init__.py
+++ b/copyparty/__init__.py
@@ -42,10 +42,7 @@ class EnvParams(object):
self.t0 = time.time()
self.mod = None
self.cfg = None
- try:
- self.ox = sys.oxidized
- except:
- self.ox = False
+ self.ox = getattr(sys, "oxidized", None)
E = EnvParams()
diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py
index b186eb5a..deb16013 100644
--- a/copyparty/httpcli.py
+++ b/copyparty/httpcli.py
@@ -822,6 +822,7 @@ class HttpCli(object):
fn = os.devnull
params.update(open_ka)
+ assert fn
if rnd and not self.args.nw:
fn = self.rand_name(fdir, fn, rnd)
diff --git a/copyparty/util.py b/copyparty/util.py
index 05314b93..0b5e9288 100644
--- a/copyparty/util.py
+++ b/copyparty/util.py
@@ -686,14 +686,16 @@ class Magician(object):
mime = magic.from_file(fpath, mime=True)
mime = re.split("[; ]", mime, 1)[0]
- ret = EXTS.get(mime)
+ try:
+ return EXTS[mime]
+ except:
+ pass
- if not ret:
- mg = mimetypes.guess_extension(mime)
- if mg:
- return mg[1:]
- else:
- raise Exception()
+ mg = mimetypes.guess_extension(mime)
+ if mg:
+ return mg[1:]
+ else:
+ raise Exception()
class Garda(object):
diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css
index 13a0835a..97571fcf 100644
--- a/copyparty/web/browser.css
+++ b/copyparty/web/browser.css
@@ -2811,6 +2811,7 @@ html.b #tree li {
html.b #tree li {
margin-left: .8em;
}
+html.b #docul a,
html.b .ntree a {
padding: .6em .2em;
}
diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js
index f6a0d5f6..9f06b0e7 100644
--- a/copyparty/web/browser.js
+++ b/copyparty/web/browser.js
@@ -471,7 +471,7 @@ var Ls = {
"utl_name": "filnavn",
"utl_stat": "status",
- "utl_prog": "progresjon",
+ "utl_prog": "fremdrift",
"ul_flagblk": "filene har blitt lagt i køen
men det er en annen nettleserfane som holder på med befaring eller opplastning akkurat nå,
så venter til den er ferdig først",
@@ -5039,7 +5039,7 @@ var treectl = (function () {
r.reqls = function (url, hpush, back) {
var xhr = new XHR();
- xhr.top = url;
+ xhr.top = url.split('?')[0];
xhr.back = back
xhr.hpush = hpush;
xhr.ts = Date.now();
@@ -5102,7 +5102,7 @@ var treectl = (function () {
if (this.hpush && !showfile.active())
hist_push(this.top);
- if (!this.back && !treectl.hidden) {
+ if (!this.back) {
var dirs = [];
for (var a = 0; a < res.dirs.length; a++)
dirs.push(res.dirs[a].href.split('/')[0].split('?')[0]);
diff --git a/copyparty/web/util.js b/copyparty/web/util.js
index e469da80..4d6e6f64 100644
--- a/copyparty/web/util.js
+++ b/copyparty/web/util.js
@@ -235,7 +235,7 @@ function ev(e) {
return;
if (e.preventDefault)
- e.preventDefault()
+ e.preventDefault();
if (e.stopPropagation)
e.stopPropagation();
diff --git a/scripts/make-sfx.sh b/scripts/make-sfx.sh
index ad51e55a..3ea39ae2 100755
--- a/scripts/make-sfx.sh
+++ b/scripts/make-sfx.sh
@@ -120,7 +120,7 @@ tmpdir="$(
)"
[ $repack ] && {
- old="$tmpdir/pe-copyparty"
+ old="$tmpdir/pe-copyparty.$(id -u)"
echo "repack of files in $old"
cp -pR "$old/"*{py2,j2,ftp,copyparty} .
}