-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update license info and comments in Fuzzy Search Project
- Loading branch information
1 parent
1671c89
commit 225b3ad
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -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)) { | ||
|