quicksilver / Quicksilver

Quicksilver Project Source
http://qsapp.com
Apache License 2.0
2.72k stars 283 forks source link

File's path appears as "iCloud" instead of it's real location, when browsing Google Drive files #2939

Open soloetra opened 1 year ago

soloetra commented 1 year ago

I search for Google Drive and is path is something like /Library/CloudStorage/GoogleDrive...

As soon as I go inside that folder, the path changes to "iCloud" and remains like that for every file inside Google Drive.

MacOS Ventura

n8henrie commented 1 year ago

Hi,

Can you please use the issue template? I don't think we'll be able to offer much help given the level of detail you've provided.

Also, is this happening with any other path?

/Library/CloudStorage looks wrong. Are you sure it's not under ~?

footlooseboss commented 1 year ago

> fileproviderctl 

File Provider control utility.
fileproviderctl <command> <options>

Commands:
  listproviders                                                  - Show registered providers
  enumerate|ls <provider|collection>                             - enumerate a container
      -v,--verbose                                                      verbose output
      -i,--item <item id>                                               monitor a container other than root
      -w,--workingset                                                   monitor the working set (equiv. to -i <working set identifier>)
      -d,--sort-by-date                                                 sort by date instead of name
      -t,--type <UTI>                                                   item type displayed in the enumeration (default: public.item)
      -u,--thumbnail                                                    output thumbnails via 1337 escape code
      -e,--no-cache                                                     don't use the cache on disk
  thumbnail [<provider> <domain> <itemid>]|[<url>]               - dump thumbnail for an item
  attributes <item> [--direct]                                   - get attributes for a url [from fpd]
  dump [<domain|provider>]                                       - dump state of fileprovider's daemon
      --limit-dump-size                                                 limit the number of items dumped
  signal <provider> [<item id>]                                  - signal a provider on the given item (defaults to working set)
  materialize <item>                                             - materialize the path on disk
  evict <item>...                                                - make the paths on disk dataless
      -n,--namespace                                                    attempt to evict directories
  coordinate                                                     - perform a coordination on a given path
      -R, --recursive <path>                                            perform a recursive read
      -r, --read <path>                                                 perform a single item read
      -w, --write <path>                                                perform a coordinated write
      -d, --delete <path>                                               perform a coordinated delete
      -t, --time <seconds>                                              hold coordination for this long (default: inf)
      -e, --debug                                                       dump file coordination info
  stabilize [<domain>...]                                        - wait for the domain to stabilize
      -B, --barrier <item id>                                           apply a barrier on the specified item instead of a full stabilizatio
  evaluate <item>                                                - evaluate finder actions and decorations on item
  evaluate <action> [<item>] <target item>                       - evaluate finder interactions
  domain <action> [<domainid>]                                   - modify domains properties
  interactive-scheduling <domain>                                - interactive scheduling session
  check | repair                                                 - run FPCK
      -f                                                                perform a full dump (all items)
      -a <path>                                                         perform check under path
      -b <path>                                                         operate on an already created DB backup. If this is set you need to set -a to point to the domain ro
      -o <path>                                                         write output into file at path
      -P                                                                no-pager output
      -d                                                                dimisss low-importance invariants
      -v                                                                print out files with broken invariants
      -m [<providerDomainID>]                                           perform check on the d2d migration backup
ernstki commented 1 year ago

Also, is this happening with any other path?

/Library/CloudStorage looks wrong. Are you sure it's not under ~?

@n8henrie Dropbox is behaving this way now, too. I'm sure I won't use the right words, but a (fairly unwelcome, if I'm being honest) recent Dropbox update switched to using "cloud storage" services built in to the OS, as opposed to their own sync/update routines, sitting on top of ~/Dropbox.

The automatic update process for Dropbox left ~/Dropbox as a symlink to /Users/me/Library/CloudStorage/Dropbox. I assume Google Drive is doing the same thing, and suspect that in both cases it's to smooth the transition for users, preserving access from the terminal and Shift+Command+G at the old, more obvious location.

As a consequence, it's no longer possible to tell identically-named subdirectories apart in Quicksilver, because where the full pathname used to display below the match, it just says "iCloud."

Screenshot of Quicksilver moving a file from the desktop to a subdirectory named "Screenshots" in Dropbox; the interface no longer shows any indication of the location of the "Screenshots" folder, other than "iCloud"

I presume just a little bit more work needs to be done to query the "real" path out of whatever API macOS provides and display that instead of just "iCloud." An alternative might be to exclude ~/Dropbox or ~/Google Drive (as the case may be) from the catalog, but include, recursively ~/Library/CloudStorage/TheServiceName instead.

n8henrie commented 1 year ago

What a mess. I uninstalled Dropbox and Google Drive when they started requiring and requesting permissions to access all kinds of stuff they didn't need to be touching, now I use rclone to connect to Google Drive and sync a specific folder as a chrome job, and Syncthing to sync that folder to my iCloud storage, which syncs to my phone / Mac / various Linux devices. Convoluted, but works well for me.

At some point I'll look into this, but currently stuck on getting the last few tests passing. I'm not confident enough in my ObjC or the QS database to be tinkering too much without a reasonably complete test suite to ensure I'm not breaking things.