- return self.list().then(function(data) {
- self.fileList = (data.result || []).map(function(file) {
- return new Item(file, self.currentPath);
- });
- self.buildTree(path);
- });
+ if(self.searchModalActive){
+ return self.searchlist(null).then(function(data) {
+ self.fileList = (data.result || []).map(function(file) {
+ return new Item(file, self.currentPath);
+ });
+ self.buildTree(path);
+ });
+ }else{
+ return self.list().then(function(data) {
+ self.fileList = (data.result || []).map(function(file) {
+ return new Item(file, self.currentPath);
+ });
+ self.buildTree(path);
+ });
+ }