Re: fopen
Re: fopen
- Subject: Re: fopen
- From: Fritz Anderson <email@hidden>
- Date: Thu, 30 Jun 2005 13:01:03 -0500
On 30 Jun 2005, at 12:38 PM, Carl Smith wrote:
I put my xcode project into my new users/me folder and opened the
xcode from the new location.
My problem is I have an FILE *fp = fopen(m_szfilepathandname, “wb”)
line that was working before. Now it fails, fp = NULL, and the
folder is not created, on my hard drive, as it was before. It is
like I do not have permissions to create this folder, but before I
did.
1. You speak of creating a folder, which is done with mkdir, not
fopen. x-man-page://2/mkdir . If you pass fopen a path containing a
directory that does not exist, it will fail. x-man-page://fopen .
2. Did you examine the global errno? What did it contain? You assume
it's a permission denial, but the error code would tell you. If my
guess from (1) is correct, it contains ENOENT, for a component of the
path not existing. (Most of the error codes are at x-man-page://2/
open . I am drunk with x-man-page URLs.)
3. By the way, you don't mention how you build the file path.
Remember that working directories may differ depending on whether an
application is run from within Xcode or on its own.
-- F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >fopen (From: "Carl Smith" <email@hidden>) |