Skip to content

Commit 81b48fb

Browse files
committed
Merge pull request #2497 from ajaxorg/better-gotofile-3
[Liskov] [Trivial] Better gotofile
2 parents dec5797 + 2da9fe2 commit 81b48fb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

plugins-client/ext.gotofile/gotofile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ module.exports = ext.register("ext/gotofile/gotofile", {
278278
var glue = end + start;
279279

280280
var c = array.length;
281+
var i = 0;
281282
var arrN = [];
282-
while(c--) { arrN.unshift(c); }
283+
while(i < c) { arrN.push(i++); }
283284

284285
data = apf.getXml("<d:multistatus xmlns:d='DAV:'><d:response>"
285286
+ start + arrN.join(glue) + end + "</d:response></d:multistatus>");

plugins-client/ext.gotofile/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module.exports.fileSearch = function(filelist, keyword) {
100100
var path = "";
101101
var result;
102102
result = matchPath(name, keyword);
103-
if (!result.length || result.length > 6)
103+
if (!result.length || result.length > 10)
104104
continue;
105105
var matched = name.substring(result[0].val.length);
106106
// The less the number of groups matched, the higher prio we give

0 commit comments

Comments
 (0)