delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/31/08:08:03

X-Spam-Check-By: sourceware.org
Message-ID: <2f9457700701310507v333ef0a7rb15ea41a21bab977@mail.gmail.com>
Date: Wed, 31 Jan 2007 08:07:37 -0500
From: "Patrick Herbst" <paherbst AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Relative vs. Absolute path problem
Cc: stephenry AT gmail DOT com
MIME-Version: 1.0
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

from your home directory ../../../ = one level up from the cygwin root.

for example... if home is c:\cygwin\home\user then that relative path
would put you at c:\

the root (/) for cygwin is actually the cygwin directory (c:\cygwin)

if you're trying to get just on your c:\ you have to specify it as /cygdrive/c/

> I have an application that takes a filename parameter. The application
> uses the 'fopen' command to open the filename and process the file
> (very simple really). The problem is that when I type the filename as
> an absolute path, the file cannot be read, but when it is typed as a
> relative path, it works fine. For example,
>
>
> This works perfectly (from a directory in my home directory):
> $ ./x264.exe -o out.h264 ../../../testseq/yuv420/COASTGUARD-YUV420-CIF 352x288
>
>
> Whilst this does not:
> ./x264.exe -o out.264 /testseq/yuv420/COASTGUARD-YUV420-CIF 352x288
>
> The obvious problem would be that the two paths are not equal, but I
> can assure you that this is not the case -they both point to the same
> file. The only difference is that one path is relative and the other
> is absolute. The permissions are set so all users can read the file.

--
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