GetToNonWorkingFolder Access is Denied error message

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Greg_D
Posts: 8
Joined: Fri Feb 13, 2004 1:12 pm

GetToNonWorkingFolder Access is Denied error message

Post by Greg_D » Fri Feb 20, 2004 11:56 am

I'm trying to call the GetToNonWorkFolder method and I keep getting an Access Is Denied to "C:\release\scripts" message.

I know that I myself have access to that folder because I am an administrator on my computer, but would it be trying to use a different user to write the file?

Here is my code:
client.GetToNonWorkingFolder(file, true, true, VaultClientOperationsLib.MakeWritableType.MakeAllFilesWritable, VaultClientOperationsLib.SetFileTimeType.Modification, file.FullPath, "C:\\release\\scripts");

Thanks, Greg

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Sat Feb 21, 2004 9:25 am

Try to create/write a file in that folder from within your code, to see if it really is the permissions of the user you are running as, or whether it is something deeper in opslib.

Greg_D
Posts: 8
Joined: Fri Feb 13, 2004 1:12 pm

Post by Greg_D » Sat Feb 21, 2004 11:25 am

Was able to create and write to a file in that folder without a problem.

Basically what I am doing is just looping through the folders in the vault looking for any files that have changed within a date range. If I find a file I am trying to save it to another folder. I am logging on using the same user that I normally logon to the vault with.

Any further thoughts?

Thanks for any help you can give.

Greg

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Mon Feb 23, 2004 10:18 am

I think you need to change your second-to-last argument ("file.FullPath"). This should be a folder path, for all of the cases I could imagine. The code in the library takes the path you give here, and replaces any instances of it that it finds in the first argument's path with the string you give for the last argument.

If you wanted to get "file" (full path "$/folder/foo.cs") to "c:\things\foo.cs", you'd call with "file" for the first argument, "$/folder" for the second-to-last, and "c:\things" for the last.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

Greg_D
Posts: 8
Joined: Fri Feb 13, 2004 1:12 pm

Post by Greg_D » Mon Feb 23, 2004 10:24 am

Thanks,

I actually found a better way to do what I wanted anyway. Rather than having to save the file to a separate folder I am just using the file that is already in the working folder and reading that into a string.

Thanks for the help though.

Post Reply