delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/09/16:12:44

X-Spam-Check-By: sourceware.org
X-YMail-OSG: idCFK9oVM1mVYOIFZGWWPoVmwcN4bXbgYlxoAvRM_.HnowqZC1BVs3wXArHlKKvrtZyq2eC1WorvrvK3A1QnGu7tcPsoVJyS2gXBiJs4EcEEgqlqF3zC9gSDyJmloY0DpHfkNB667GVu1eA-
X-Mailer: YahooMailRC/368.7 YahooMailWebService/0.6.132.7
Date: Fri, 9 Feb 2007 13:12:22 -0800 (PST)
From: winner wei <blueleaf4tg AT yahoo DOT com>
Subject: just failing to open a file at specified location/directory
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-ID: <302106.31853.qm@web32409.mail.mud.yahoo.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l19LCXKM018332

Hi,

when I wanted to open a file at a specified directory for writing, running it in Cygwin, the opening just failed. It is extremely simple, like this:

if((fp=fopen("C:\cygdrive\c\home\user\data\filename", "w"))==NULL)
{
handling exception...
}

I also tried a few other ways for the pathname, like C:\home\user\data\filename; C:/cygdrive/c/home/user/data/filename; no one works. It only worked when just used a bare name without any pathname before it, but not the location as you hoped.

Any one can give some help? Thanks a lot!!!

David


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019