Skip to content

Commit

Permalink
Update license info and comments in Fuzzy Search Project
Browse files Browse the repository at this point in the history
  • Loading branch information
colinkiama committed Jan 10, 2024
1 parent 1671c89 commit 225b3ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/fuzzy-search/fuzzy-search-project.vala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-FileCopyrightText: 2023 elementary, Inc. <https://elementary.io>
*
* Authored by: Marvin Ahlgrimm
* Authored by: Colin Kiama <[email protected]>
*/

public class Scratch.Services.SearchProject {
Expand Down Expand Up @@ -36,14 +37,14 @@ public class Scratch.Services.SearchProject {
string subpath = path.replace (root_path, "");
string deleted_path = subpath.substring (1, subpath.length - 1);

// Remove File
if (relative_file_paths.contains (deleted_path)) {
// path deleted is for a file
relative_file_paths.remove (deleted_path);
return;
}

// Path deleted is for a directory
int start_length = relative_file_paths.size;
// Remove directory
for (int i = start_length - 1; i > -1; i--) {
string relative_path = relative_file_paths[i];
if (relative_path.has_prefix (deleted_path)) {
Expand Down

0 comments on commit 225b3ad

Please sign in to comment.