This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNC Pathname Handling within Applications


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]