Skip to content

Commit

Permalink
ui: fix mkdir race when navpane is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
9001 committed Oct 11, 2021
1 parent 3b4dfe3 commit 8399e95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions copyparty/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -3282,15 +3282,15 @@ 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;
xhr.ts = Date.now();
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');
Expand Down

0 comments on commit 8399e95

Please sign in to comment.