IExplorerUtil.GetWorkingFolder() returns wrong path?

IExplorerUtil.GetWorkingFolder() returns wrong path?

Anonymous
Not applicable
899 Views
4 Replies
Message 1 of 5

IExplorerUtil.GetWorkingFolder() returns wrong path?

Anonymous
Not applicable

As subject. When I pass the serviceManager.DocumentService.GetFolderRoot() I get "C:\\Users\\noontz\\Documents\\Vault\\" instead of the correct mapping  "C:\\vaultroot\\" in this case )..

Here´s my usual suspects:

 I´m using Vault Basic, BUT, ExplorerLoader.LoadExplorerUtil() returns a IExplorerUtil just fine, so I presume the limitations is on explorer extensions?

 The local folder is not yet created, BUT, Opening the explorer > add file ( Anywhere on the computer/myFile.txt ) > get/checkout will create the rootfolder correctly e.g. "C:\\vaultroot\\myFile.txt", so the correct information is there somewhere.

 

Bottom line: How do I obtain the correct local mirror of  "$" with vault basic through API

0 Likes
Accepted solutions (1)
900 Views
4 Replies
Replies (4)
Message 2 of 5

Redmond.D
Autodesk
Autodesk

How is the working folder set in your Vault?  Is it through the "Enforce Working Folder" option in the Vault settings?

enforceworkingfolder.png



Doug Redmond
Software Engineer
Autodesk, Inc.

0 Likes
Message 3 of 5

Anonymous
Not applicable

In both my test cases yes.

 

That said I´m looking for a solution that works in both scenarios ( enforce OR allow )

 

Since the information is persistent some kind of hack should be possible, but despite half a days search in the registry and a vast amount of XML like files for something interesting: No cigar 😞

0 Likes
Message 4 of 5

Redmond.D
Autodesk
Autodesk
Accepted solution

Try this algorithm....

 

Use the DocumentService to read the setting "enforce" setting from the Vault server.

GetEnforceWorkingFolder() tells you if the feature has been enabled.  If it returns true, use GetRequiredWorkingFolderLocation() to find the Value.

If false, use IExplorerUtil.GetWorkingFolder().

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 5

Anonymous
Not applicable

That did it! ( both scenarios & vault basic ) Big thanks Doug! You just saved my day ( and the next three or four I believe  )  This also answers my last post in this thread about a less heavy way to get the local root path.

I´m a happy man! ( Where is that smiley with two beers ? )

0 Likes