Archive: CreateDirectory and UNCs


CreateDirectory and UNCs
Hi,

I'm encountering a problem that is getting a little out of my league. Here's what I'm trying to do:

1. Get a path from the user,
2. Create the path if it does not already exist, and
3. Generate an error if the path could not be created.

After getting the path from the user, this is what I'm trying:

...
ClearErrors
CreateDirectory "${PATH_DB}"
IfErrors 0 NextStepToPerform
MessageBox MB_OK "Unable to create folder ${PATH_DB}"
NextStepToPerform:
...

If I run this code and specify a new folder using a UNC (I have permissions to create the folder), the folder is successfully created by NSIS, however I hit the error message. If I specify a folder that has already been created using a UNC, I also hit the error message.

If I specify a local drive or map the network drive, NSIS doesn't generate the error message in either case (specifying a new folder or an existing folder).

I've tried compiling the script on both 2.0b3 and today's 2.0b4cvs with the same results. Can anyone shed some light on the issue?

Many thanks,
Dave.

ps. My current solution to overcome the problem is:

...
IfFileExists "${PATH_DB}\*.*" NextStepToPerform
CreateDirectory "${PATH_DB}"
IfFileExists "${PATH_DB}\*.*" NextStepToPerform
MessageBox MB_OK "Unable to create folder ${PATH_DB}"
NextStepToPerform:
...

It works, however it doesn't feel elegant.


Thanks, fixed in latest CVS version.


BTW, that last problem you've mentioned with CreateDirectory was also recently fixed.