Skip to content

Commit

Permalink
bug fix #3209 (#3457)
Browse files Browse the repository at this point in the history
Co-authored-by: ricar <ricar@ASUS>
  • Loading branch information
ricardosantos9521 and ricar committed May 21, 2020
1 parent a856263 commit c7fb1f6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ public List<SearchResult> ExecuteQuery(ISearchQueryHelper queryHelper, string ke
{
while (WDSResults.Read())
{
if(WDSResults.GetValue(0) != DBNull.Value && WDSResults.GetValue(1) != DBNull.Value)
if (WDSResults.GetValue(0) != DBNull.Value && WDSResults.GetValue(1) != DBNull.Value)
{
var uri_path = new Uri(WDSResults.GetString(0));
var result = new SearchResult
{
Path = WDSResults.GetString(0),
Path = uri_path.LocalPath,
Title = WDSResults.GetString(1)
};
_Result.Add(result);
Expand Down Expand Up @@ -90,7 +91,7 @@ public void InitQueryHelper(out ISearchQueryHelper queryHelper, int maxCount)
queryHelper.QueryMaxResults = maxCount;

// Set list of columns we want to display, getting the path presently
queryHelper.QuerySelectColumns = "System.ItemPathDisplay, System.FileName";
queryHelper.QuerySelectColumns = "System.ItemUrl, System.FileName";

// Set additional query restriction
queryHelper.QueryWhereRestrictions = "AND scope='file:'";
Expand Down

0 comments on commit c7fb1f6

Please sign in to comment.