From 8399e95bda9a43c3c68c55c948bd4696a9374c27 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 12 Oct 2021 00:46:44 +0200 Subject: [PATCH] ui: fix mkdir race when navpane is closed --- copyparty/web/browser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 87c657af..c3392e37 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -3154,7 +3154,7 @@ var treectl = (function () { treectl.goto = function (url, push) { get_tree("", url, true); - reqls(url, push); + reqls(url, push, true); } function get_tree(top, dst, rst) { @@ -3282,7 +3282,7 @@ var treectl = (function () { reqls(this.getAttribute('href'), true); } - function reqls(url, hpush) { + function reqls(url, hpush, no_tree) { var xhr = new XMLHttpRequest(); xhr.top = url; xhr.hpush = hpush; @@ -3290,7 +3290,7 @@ var treectl = (function () { xhr.open('GET', xhr.top + '?ls' + (treectl.dots ? '&dots' : ''), true); xhr.onreadystatechange = recvls; xhr.send(); - if (hpush) + if (hpush && !no_tree) get_tree('.', xhr.top); enspin(thegrid.en ? '#gfiles' : '#files');