About   |   Getting Started   |   Downloads   |   Documentation   |   Forum


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
makeDirectory permissions
06-26-2017, 11:09 AM (This post was last modified: 06-26-2017 11:20 AM by Rick Johnson.)
Post: #1
makeDirectory permissions
I'm getting different results here with Mac and Win 10, using AI 21:

Code:
OKsoFar = hdi::core::files::makeDirectory(this->prefPath, 0777);

The header says this is safe to use if the directory already exists. If it does exist, Mac returns true, Win returns false. Both create the directory if it does not exist. A reasonable workaround is to ignore the result and check again if the directory exists, but I'd rather be certain that I'm using the function correctly. Could it be that I'm specifying the permissions wrong?
Find all posts by this user
Quote this message in a reply
06-30-2017, 09:51 AM
Post: #2
RE: makeDirectory permissions
Thanks for reporting this. Looks like a minor bug in handling the return value of the internal Windows function that creates the directory. Windows considers it an error condition if the directory already exists, and we'll need to add a manual check for this.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)