Skip to content

Commit

Permalink
Allow wildcards in ignore list
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorgalvao committed Jan 19, 2022
1 parent 1aebe80 commit e6f86ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When done, call `gd` and type to filter the contents of your Google Drive. `gdf`
The Workflow Environment Variables have defaults which will work for most. You only have to mess with them if you have an atypical setup.

* `google_drive_path`: The location of Google Drive on your file system. Can take multiple paths separated by commas.
* `ignore_list`: A comma-separated list of keywords to ignore. If any appears in a path, it will not be saved to your cache.
* `ignore_list`: A comma-separated list of case-sensitive keywords to ignore. If any appears in a path, it will not be saved to your cache. Wildcard characters are interpreted.
* `result_limit`: How many entries to show in Alfred.

`!gddiagnostic` inspects the current Workflow configuration. It is to be run when asking for help.
Expand Down
4 changes: 2 additions & 2 deletions Workflow/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ When done, call `gd` and type to filter the contents of your Google Drive. `gdf`
The Workflow Environment Variables have defaults which will work for most. You only have to mess with them if you have an atypical setup.
* `google_drive_path`: The location of Google Drive on your file system. Can take multiple paths separated by commas.
* `ignore_list`: A comma-separated list of keywords to ignore. If any appears in a path, it will not be saved to your cache.
* `ignore_list`: A comma-separated list of case-sensitive keywords to ignore. If any appears in a path, it will not be saved to your cache. Wildcard characters are interpreted.
* `result_limit`: How many entries to show in Alfred.
`!gddiagnostic` inspects the current Workflow configuration. It is to be run when asking for help.</string>
Expand Down Expand Up @@ -1372,7 +1372,7 @@ The Workflow Environment Variables have defaults which will work for most. You o
<string>50</string>
</dict>
<key>version</key>
<string>2022.5</string>
<string>2022.6</string>
<key>webaddress</key>
<string>https://github.com/alfredapp/google-drive-workflow/</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Workflow/rebuild_cache
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ db.execute('CREATE TABLE main (fullpath TEXT, basename TINYTEXT, isdir BOOLEAN,
Gdrive_paths.each do |gdrive_path|
gdrive_path.find.lazy.each do |path|
next if path.symlink?
next if Ignores.any? { |i| path.include?(i) }
next if Ignores.any? { |i| path.fnmatch?("*#{i}*") }

accesstime = path.atime.to_i rescue 0
fullpath = path.to_path
Expand Down

0 comments on commit e6f86ac

Please sign in to comment.