Gdrive with crypt and cache - cannot access files outside of root dir

Hi! I’m having a little confusion around the way gdrive works with cache and crypt. My goal is to create a configuration file that will be pointed at a subdirectory in my gdrive.

For example, the following config works

[gdrive]
type = drive
client_id = xxx.apps.googleusercontent.com
client_secret = xxx
scope = drive
token = {"access_token":"xxx"}

[gcache]
type = cache
remote = gdrive:/
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G

[gcrypt]
type = crypt
remote = gcache:/
filename_encryption = standard
directory_name_encryption = true
password = xxx
password2 = xxx

I am using a root directory for gcache (gdrive:/) and I’m able to do a directory listing as expected

❯  rclone --cache-db-purge lsd gcrypt:/
Enter configuration password:
password:
          -1 2018-10-26 20:20:41        -1 dir1
          -1 2018-10-26 20:19:09        -1 dir2
          -1 2018-10-31 08:13:57        -1 dir3

What I’d like to do is create a config that when doing a directory listing on / will only return the contents of dir1. So I updated my gcache config to use gdrive:/dir1.

[gdrive]
type = drive
client_id = xxx.apps.googleusercontent.com
client_secret = xxx
scope = drive
token = {"access_token":"xxx"}

[gcache]
type = cache
remote = gdrive:/dir1
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G

[gcrypt]
type = crypt
remote = gcache:/
filename_encryption = standard
directory_name_encryption = true
password = xxx
password2 = xxx

However, when I try to list the directory I receive

❯  rclone --cache-db-purge lsd gcrypt:/
Enter configuration password:
password:
2018/10/31 09:35:22 ERROR : : error listing: directory not found
2018/10/31 09:35:22 Failed to lsd: directory not found

Not sure why this is failing as gcrypt:/ should point to gcache:/, which is using gdrive:/dir1 (I also tried gdrive:dir1).

I also tried switching around the gcache and gcrypt config like this

[gdrive]
type = drive
client_id = xxx.apps.googleusercontent.com
client_secret = xxx
scope = drive
token = {"access_token":"xxx"}

[gcache]
type = cache
remote = gdrive:/
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G

[gcrypt]
type = crypt
remote = gcache:dir1
filename_encryption = standard
directory_name_encryption = true
password = xxx
password2 = xxx

But I receive the same error. What am I missing?

Thanks in advance for the help!

I normally just setup a gdrive root entry like you have:

[gcache]
type = cache
remote = GD:media

and the crypt

[gmedia]
type = crypt
remote = gcache:
filename_encryption = standard
password = password
password2 = password
directory_name_encryption = true

and that works for me without an issue. Is the first directory you are pointing to created?

I can see my encrypted dirs if I lsd the mount:

felix@gemini:/data/rclone$ rclone lsd GD:media
          -1 2018-06-30 12:55:49        -1 d93daonsmv845k5s40knr5mf4s
          -1 2018-06-17 09:16:39        -1 s1n6gn87oo537vvls13nahl6co
          -1 2017-04-18 16:14:26        -1 smu5ej34ujbdoip1cm3mlk92q4
          -1 2018-06-17 10:24:02        -1 tnvepu36qiohcun8v84ddhsam0