alfredapp / google-drive-workflow

Alfred Workflow for Google Drive
BSD 3-Clause "New" or "Revised" License
168 stars 8 forks source link

New Root Folder issue with too many results #46

Closed josh33 closed 2 years ago

josh33 commented 2 years ago

Hi There,

First off - thanks for an excellent workflow. I sync 4 different Google Drive folders, so I'm pointing the workflow to my User root directory. Initially, I wasn't excluding anything, and it started to include all files throughout my user directory (like files in hidden . folders). So then I reinstalled and added files to exclude, but did not list out the hidden dot files. Any ideas? How should I configure this for multiple?

### Workflow version
2022.16

### Alfred version
5.0

### macOS version
12.4

### Architecture
i386

### Preferences
Dict {
    ignore_list = Applications
DataGripProjects
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Public
Sites
Trash
    google_drive_path = /Users/.../
}

### Full Disk Access
Granted

### Google drive path
Exists: /Users/.../
1086288 paths

### Cache dir
cache.db

### Cache file
16777220 64445178 -rw-r--r-- 1 ... staff 0 20152320 "Jul 26 12:05:53 2022" "Jul 26 12:04:30 2022" "Jul 26 12:04:30 2022" "Jul 26 12:00:58 2022" 4096 41088 0 /Users/.../Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db

### Temporary cache
Does NOT exist

### Build progress
NOT running

### Launchd job
Loaded: -   0   com.alfredapp.googledrive
Installed
vitorgalvao commented 2 years ago

First off - thanks for an excellent workflow.

Thank you for the kind words.

I'm pointing the workflow to my User root directory.

Are the four drives in your user root directory? Aren’t they under a directory under that? And if not, can’t you change it?

The proper way to do it (maybe; I can’t say for sure because you removed important information from the diagnostic) is to list the four drive locations separately in the configuration, separated by commas. Alternatively, store them all under the same location with nothing else and add that. Don’t forget to :gdrebuildcache afterwards.

josh33 commented 2 years ago

So it took me a while but I changed my directory to /Users/.../Library/CloudStorage/ and everything worked. I didn't need to exclude anything. Sorry to obscure data - it was just my directory name. I'm now able to reference files across different Google Drive folders. I like this workflow more than the google drive popup (cmd-option-g) because it can open all file types, whereas the google drive popup sometimes mistakes filenames for folders (like .mindnode files). Thanks again for a great extension!

vitorgalvao commented 2 years ago

Glad it’s working! Tip for obscuring the home folder: use ~/Library instead of /Users/…/Library. Tilde is the UNIX (which macOS is) character used to abbreviate the location of the home directory. That way there’s less confusion than , which may represent multiple obscured parts of the path.

Have a great week!