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

X-Spam-Check-By: sourceware.org
Message-ID: <45DAFED2.9426A57@dessent.net>
Date: Tue, 20 Feb 2007 05:59:46 -0800
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.5.24 unable to access files via root / (forward slash)
References: <9061924 DOT post AT talk DOT nabble DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
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

Jeff2007 wrote:

> I'm trying to access files for reading via the / directive, i.e. vi
> /usr/foo.txt
> However, this will not open foo.txt, vi creates a new file in the current
> directory instead.
> I can cd to the /usr directory and open the file with vi usr.txt. I'm using
> vi as an example, I'm actually trying to compile files with a gcc variant,
> and it can't access files the the / path either.

You have a whole mess of non-Cygwin programs in your path.  In the case
of vi, you're using:

Found: c:\WATCOM\BINNT\vi.exe
Not Found: vim

Cygwin POSIX paths only work in Cygwin programs.  You can't expect some
Watcom version of vi to know anything about them.  If you want to use vi
in Cygwin, install the Cygwin version (vim package.)

And likewise with gcc, you don't have a Cygwin version of gcc
installed.  This means you won't be able to use POSIX paths, and you
won't be compiling Cygwin binaries.

If you want consistency in your command line tools you really need to
clean up your PATH.  For one thing it looks like it contains invalid
characters:

        "C
        D:\cygwin_root\Program Files\AMD\CodeAnalyst\bin"
        "C
        D:\cygwin_root\Program Files\AMD\CodeAnalyst\"

This usually happens when you have typos like "C;D:\foo".  You need to
fix those, but in general you need to remove a bunch of the crap you
have in there, or otherwise realize that when invoking a non-Cygwin
binary you can't use Cygwin features such as POSIX paths.  Or use
cygpath to convert between them.

Brian

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