Fix search in shared folders
This commit is contained in:
parent
fc91cf606b
commit
c9ac3c7c2b
@ -122,7 +122,7 @@ define([
|
|||||||
var results = uo.findFile(id);
|
var results = uo.findFile(id);
|
||||||
if (fPath) {
|
if (fPath) {
|
||||||
// This is a shared folder, we have to fix the paths in the results
|
// This is a shared folder, we have to fix the paths in the results
|
||||||
results.map(function (p) {
|
results.forEach(function (p) {
|
||||||
Array.prototype.unshift.apply(p, fPath);
|
Array.prototype.unshift.apply(p, fPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -833,10 +833,11 @@ define([
|
|||||||
userObjects.forEach(function (uo) {
|
userObjects.forEach(function (uo) {
|
||||||
var fPath = _getUserObjectPath(Env, uo);
|
var fPath = _getUserObjectPath(Env, uo);
|
||||||
var results = uo.search(value);
|
var results = uo.search(value);
|
||||||
|
if (!results.length) { return; }
|
||||||
if (fPath) {
|
if (fPath) {
|
||||||
// This is a shared folder, we have to fix the paths in the search results
|
// This is a shared folder, we have to fix the paths in the search results
|
||||||
results = results.map(function (r) {
|
results.forEach(function (r) {
|
||||||
r.paths.map(function (p) {
|
r.paths.forEach(function (p) {
|
||||||
Array.prototype.unshift.apply(p, fPath);
|
Array.prototype.unshift.apply(p, fPath);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -964,7 +965,7 @@ define([
|
|||||||
isFolderEmpty: callWithEnv(isFolderEmpty),
|
isFolderEmpty: callWithEnv(isFolderEmpty),
|
||||||
isPathIn: callWithEnv(isPathIn),
|
isPathIn: callWithEnv(isPathIn),
|
||||||
isSubpath: callWithEnv(isSubpath),
|
isSubpath: callWithEnv(isSubpath),
|
||||||
isinTrashRoot: callWithEnv(isInTrashRoot),
|
isInTrashRoot: callWithEnv(isInTrashRoot),
|
||||||
comparePath: callWithEnv(comparePath),
|
comparePath: callWithEnv(comparePath),
|
||||||
hasSubfolder: callWithEnv(hasSubfolder),
|
hasSubfolder: callWithEnv(hasSubfolder),
|
||||||
hasFile: callWithEnv(hasFile),
|
hasFile: callWithEnv(hasFile),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user