delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/15/00:16:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Thu, 15 Jul 2004 00:15:27 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: UNC Pathname Handling within Applications
Message-ID: <20040715041527.GB3427@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20040715033232 DOT GP25893 AT eumel DOT yoo DOT local>
Mime-Version: 1.0
In-Reply-To: <20040715033232.GP25893@eumel.yoo.local>
User-Agent: Mutt/1.4.1i

On Thu, Jul 15, 2004 at 05:32:32AM +0200, Thorsten Haude wrote:
>I'm trying to find the best approach to solve a bug reported against
>NEdit: 
>https://sourceforge.net/tracker/index.php?func=detail&aid=873188&group_id=11005&atid=111005
>
>The reporter complains that NEdit cannot open files from network
>shares using Cygwin's double-slash notation. That is not suprising,
>since NEdit silently drops any doubled slash before using the path.
>
>I know that NEdit is not the only application ignoring multiplied
>slashes, so I wonder how this is normally handled with Cygwin. Indeed,
>a simple test on Linux seems to indicate that fopen() accepts any
>number of slashes, so this is not isolated to NEdit.

Why would the fact that linux can open files with any number of slashes
indicative of a problem with other applications?  Cygwin can open files
with any number of slashes too as long as they are not the first slash.

>- The user guide ("Mapping path names") does tell me something about
>what's to expect but little about implementation.

Implementation of what?  It isn't obvious what you are expecting cygwin
to do or how you are expecting it to help.  By the time Cygwin sees the
file spec the extra slash has been removed.  There is no amount of help
that cygwin can provide at that point.

>- Googling brought me zilch, all involved words seem to be much too
>generic to find anything, and Google does not search for slashes.
>- I was also looking for another document (Posix?) to help here but
>came up empty.
>
>
>My questions:
>- Is there any standard way to approach this problem?

This is an application problem, not a windows or cygwin problem.  Double
slashes at the beginnning of a path name are allowed to mean something
different and if an application doesn't recognize that fact, that is at
least arguably a bug.

So, no, there is no "standard" way to approach the problem.  You have
to modify the application if you want it to recognize this syntax.

Alternately, you can just mount your network shares:

mount -b '//foo/bar' /bar

and refer to files as /bar/blah , bypassing the need to use double slashes.

cgf

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