File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ private static string PercentEncode(string text)
6363 return Uri . EscapeDataString ( text ) ;
6464 }
6565
66- private void OpenFileInVault ( string path )
66+ private void OpenFileInVault ( string path , string vaultPath = null )
6767 {
6868 if ( _settings . EnableAdvancedURI is false )
6969 {
7070 Process . Start ( $ "obsidian://open?path={ PercentEncode ( path ) } ") ;
7171 }
7272 else
7373 {
74- string vaultPath = GetFileVaultPath ( path ) ;
74+ vaultPath = vaultPath ?? GetFileVaultPath ( path ) ;
7575 string vault = GetVaultName ( vaultPath ) ;
7676 string filename = Utils . GetRelativePath ( vaultPath , path ) ;
7777
@@ -177,7 +177,7 @@ private void OpenFileInRecent(string path)
177177 path_in_recent = CreateLinkInRecent( directory . Parent , false ) + '\\ ' + directory . Name ;
178178 }
179179
180- OpenFileInVault ( path_in_recent ) ;
180+ OpenFileInVault ( path_in_recent , _settings . RecentVault ) ;
181181 }
182182
183183 private static string FormatLinkName ( string prefixed_name , bool explicitDirectory )
You can’t perform that action at this time.
0 commit comments