Explore here not working with custom path

Hi!
When I set a custom path in my Project Settings / Roots, the “Explore here” button opens the Terminal at C:\Windows\System32. The tab title of Terminal shows the correct path, but the terminal doesn’t.

If I use the subst command to map the folder to a drive (e.g. P:\), explore here works. But if I point directly to the Google Drive folder on my computer, it doesn’t work.

Tried custom path with \ and /

My settings:
local: Q:\Shared drives\projectFolder\ (default is P:\)
work: Q:\Shared drives\projectFolder\ (default is P:\)

Thanks!

I wonder if this related to the spaces in your path.

Google Drive is really anoying on this matter.

Our team asked the Google Support for a way to change that path, but they replied we can’t :roll_eyes:

And with non-english versions of Windows it’s even worse, as the path is automatically translated, including foreign accents.

English : Q:\Shared drives

French : Q:\Drive partagés

A space, and a foreign character, you are sure to trigger problems with scripts…

Sure is.

Should be fixed by: Explore here action fix Windows behavior when path has spaces. by BigRoy · Pull Request #1985 · ynput/ayon-core · GitHub

Thanks, Mustafa and Yul.
Yeah, maybe the blank spaces could be the problem.

Yul, we are using a script to map the Google Drive folder to a Drive letter using the subst command running automatically at startup. So instead of G:\Shared drivers\ProjectRootFolder\ProjectNameFolder, we’re using P:\ProjectNameFolder.

We put the .bat and .sh files inside the pipeline folder and asked Claude to search “ProjectRootFolder” and map to P:. After mapping, the path will be P:\ProjectNameFolder

I believe AYON can offer a bit on this end to with the map drive feature in core (although I haven’t used it much myself) - but yes, mapping to a consistent mapping if you can is what I’d recommend.

It’s also helpful for the actual production files.

Yes subst is a workaround, but not a full one, there are limitations :

  • subst only affects the current login session, so if you elevate to a privileged one, or need a service to access it, it will need other scripts to also set the subst there.
  • Most softwares and scripts correctly get the path provided by subst. But some low-level tools resolve the substitution back to the real path (with space), for example file-sync tools or backup softwares.

Just wanted to chime in:

I’ve never used subst much, but always use net use and that worked absolutely fine. (Note that it’s to map folder a drive letter) Never had any issue with with any app messing up with that. You’d need to perform the mapping on your own user and the admin user if you want to have access to in the privileged mode as well.

Essentially we’d all work on the P:/ drive for example, but nothing was keeping from the folder that was mounted to live somewhere completely different per user.

Hi Roy,

I have used net use for several other cases, but not this one.

Did you succeed using net use with Google Drive path ?

net use maps network resources, not arbitrary local folders.

net use expects a UNC path (\\server\share), because it’s the tool for mapping SMB network shares to a drive letter.

Q:\Shared drives isn’t a network share, it’s a local virtual drive letter created by Google Drive’s own filesystem driver.

Pretty sure you should be able to make it a shared folder so that you can map it as network drive even if on your own machine. :thinking: But yes, that wasn’t my use case at the time.

I’m working on two projects using ayon with subst mapping the Shared drives folder to a letter.

Not sure, but I think Google Drive using file streaming can’t be mapped to a network folder.

In our case, we asked Claude to make a script that creates a .bat and copy to the startup folder or to the desktop folder, and an option to delete them. As it’s copied to the startup folder, it will run every time the computer boots. Not a clean solution, but it works.

The script is inside G:\Shared drives\client_folder\ayon_project_name\pipeline\os\volumemapping\mapDriveWindows.bat
It searches for “client_folder” and uses subst to map as P:\. So we will have P:\ayon_project_name and P:/ set in the Roots project settings.

We asked to make shell scripts to linux and darwin too.