Error: EINVAL: invalid argument, mkdir 'G:'

What I’m trying to do

My obsidian no longer works after trying to open a vault stored in my Google Drive. I think I opened the wrong file, and now it’s messed up. Now, it shows the error code and doesn’t let me do anything.

Things I have tried

I tried uninstalling and installing Obsidian again and opening the command palette (ctrl+P), but it didn’t help. I can open the properties window. I searched for “mkdir ‘G:’”, but nobody else had this problem.

I am having the same issue when I opened the whole Google Drive folder instead of the one with my vault. Now I am stuck on loading even after uninstalling the app.

Please let me know if you figure out how to fix it :smiling_face_with_tear:

I fixed the issue the following way:

  1. Navigate to C:\Users\your.user\AppData\Roaming\obsidian
  2. Open obsidian.json file and modify the vault info (remove the extra vault and add open parameter to old vault)

Before:

{"vaults":{"21c9c2bd63f174oe":{"path":"G:\\My Drive\\Obsidian","ts":1699007656614},"1197c5d4383b03ef":{"path":"G:\\","ts":1700574436525,"open":true}}}

After:

{"vaults":{"21c9c2bd63f174oe":{"path":"G:\\My Drive\\Obsidian","ts":1699007656614,"open":true}}}
2 Likes

I was having the same issue and accidentally chose the entire google drive for my vault location. I was able to fix the problem by following your solution and it works! I created an account to thank you and let everyone know this solution fixed my problem. Thanks again!

2 Likes

Perfect, thank you so much! :star_struck:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.