mirror of
https://github.com/9001/copyparty.git
synced 2026-06-20 05:02:28 -06:00
fix subfolder search in top directory
This commit is contained in:
parent
1bf4845503
commit
4e585c0ebf
|
|
@ -1493,7 +1493,7 @@ html.a #up_quick .btn.on {
|
||||||
}
|
}
|
||||||
#pvolbg {
|
#pvolbg {
|
||||||
height: 1.3em;
|
height: 1.3em;
|
||||||
min-width: 1em;
|
min-width: 1.5em;
|
||||||
padding: .3em;
|
padding: .3em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -6919,7 +6919,7 @@ var search_ui = (function () {
|
||||||
folderSearch.onfocus = function(){
|
folderSearch.onfocus = function(){
|
||||||
ebi('srch_pathc').checked = true;
|
ebi('srch_pathc').checked = true;
|
||||||
var path = decodeURI(get_evpath());
|
var path = decodeURI(get_evpath());
|
||||||
ebi('srch_pathv').value = path.slice(1);
|
ebi('srch_pathv').value = path.slice(1) || '/';
|
||||||
}
|
}
|
||||||
if(IE)
|
if(IE)
|
||||||
folderSearch.onclick = function() {
|
folderSearch.onclick = function() {
|
||||||
|
|
@ -7013,6 +7013,8 @@ var search_ui = (function () {
|
||||||
if(k == 'path' && vs.endsWith('/') && !vs.match('"')){
|
if(k == 'path' && vs.endsWith('/') && !vs.match('"')){
|
||||||
vs = vs.slice(0, -1);
|
vs = vs.slice(0, -1);
|
||||||
vs = '"' + vs + (recursive ? '*' : '') + '"';
|
vs = '"' + vs + (recursive ? '*' : '') + '"';
|
||||||
|
tvs.push(vs);
|
||||||
|
vs = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
var match = vs.match(/\B("(?:[^"]|\\")*[^\\]")\B/g);
|
var match = vs.match(/\B("(?:[^"]|\\")*[^\\]")\B/g);
|
||||||
|
|
@ -7081,14 +7083,14 @@ var search_ui = (function () {
|
||||||
if (tv.slice(0, 1) == '^') {
|
if (tv.slice(0, 1) == '^') {
|
||||||
tv = tv.slice(1);
|
tv = tv.slice(1);
|
||||||
}
|
}
|
||||||
else if (!(tv.match(' ') || tv.startsWith('"'))){
|
else if (!tv.match(' ') && !tv.startsWith('"')){
|
||||||
tv = '*' + tv;
|
tv = '*' + tv;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tv.slice(-1) == '$') {
|
if (tv.slice(-1) == '$') {
|
||||||
tv = tv.slice(0, -1);
|
tv = tv.slice(0, -1);
|
||||||
}
|
}
|
||||||
else if(!(tv.match(' ') || tv.endsWith('"'))){
|
else if(!tv.match(' ') && !tv.endsWith('"')){
|
||||||
tv += '*';
|
tv += '*';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue