public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Windows/Posix path conversion fails on extra mount points
@ 2015-02-08 23:04 Thomas Wolff
  2015-02-09  9:18 ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wolff @ 2015-02-08 23:04 UTC (permalink / raw)
  To: cygwin

cygwin_create_path (CCP_WIN_A_TO_POSIX, "C:/cygwin/lib") -> "/usr/lib"
This is the correct directory, however, only by means of the extra mount 
point
of /usr/lib; I think the result should rather be the likewise correct
but more intuitive "/lib".
There is software that’s getting confused by this mix-up.

At least the round-trip works:
cygwin_create_path (CCP_POSIX_TO_WIN_A, "/usr/lib") -> "C:\cygwin\lib"
so a directory existing in the Windows world is again addressed; however,
this does not work if the directory is preceded with the cygwin root:
cygwin_create_path (CCP_POSIX_TO_WIN_A, "/cygdrive/c/cygwin/usr/lib") -> 
"C:\cygwin\usr\lib"

Thomas

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windows/Posix path conversion fails on extra mount points
  2015-02-08 23:04 Windows/Posix path conversion fails on extra mount points Thomas Wolff
@ 2015-02-09  9:18 ` Corinna Vinschen
  2015-02-09 20:47   ` Thomas Wolff
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-02-09  9:18 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

On Feb  9 00:04, Thomas Wolff wrote:
> cygwin_create_path (CCP_WIN_A_TO_POSIX, "C:/cygwin/lib") -> "/usr/lib"
> This is the correct directory, however, only by means of the extra mount
> point
> of /usr/lib; I think the result should rather be the likewise correct
> but more intuitive "/lib".
> There is software that’s getting confused by this mix-up.

If so, it's a bug in the software.  /usr/lib is a prefectly valid path.

> At least the round-trip works:
> cygwin_create_path (CCP_POSIX_TO_WIN_A, "/usr/lib") -> "C:\cygwin\lib"
> so a directory existing in the Windows world is again addressed; however,
> this does not work if the directory is preceded with the cygwin root:
> cygwin_create_path (CCP_POSIX_TO_WIN_A, "/cygdrive/c/cygwin/usr/lib") ->
> "C:\cygwin\usr\lib"

The latter is not supposed to work.  The cygdrive prefix is not supposed
to be used to point inside the Cygwin root dir.  Logically it's an entire
different path: /usr/lib != /cygdrive/c/cygwin/usr/lib.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windows/Posix path conversion fails on extra mount points
  2015-02-09  9:18 ` Corinna Vinschen
@ 2015-02-09 20:47   ` Thomas Wolff
  2015-02-10  9:25     ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wolff @ 2015-02-09 20:47 UTC (permalink / raw)
  To: cygwin

Am 09.02.2015 um 10:18 schrieb Corinna Vinschen:
> On Feb  9 00:04, Thomas Wolff wrote:
>> cygwin_create_path (CCP_WIN_A_TO_POSIX, "C:/cygwin/lib") -> "/usr/lib"
>> This is the correct directory, however, only by means of the extra mount
>> point
>> of /usr/lib; I think the result should rather be the likewise correct
>> but more intuitive "/lib".
>> There is software that’s getting confused by this mix-up.
> If so, it's a bug in the software.  /usr/lib is a prefectly valid path.
I don't know the details of that software and don't have the sources. 
But it needs to access the directory with the Windows API and somehow 
derives the Windows path back from /usr/lib which then doesn't work 
because /usr/lib doesn't exist for Windows while /lib does.
For this reason, I would suggest and appreciate if cygwin_conv_path 
disregards the mount point for its mapping in order to provide a more 
consistent match which also works with a "manual round-trip".
------
Thomas

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windows/Posix path conversion fails on extra mount points
  2015-02-09 20:47   ` Thomas Wolff
@ 2015-02-10  9:25     ` Corinna Vinschen
  2015-02-10 19:11       ` Thomas Wolff
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-02-10  9:25 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On Feb  9 21:47, Thomas Wolff wrote:
> Am 09.02.2015 um 10:18 schrieb Corinna Vinschen:
> >On Feb  9 00:04, Thomas Wolff wrote:
> >>cygwin_create_path (CCP_WIN_A_TO_POSIX, "C:/cygwin/lib") -> "/usr/lib"
> >>This is the correct directory, however, only by means of the extra mount
> >>point
> >>of /usr/lib; I think the result should rather be the likewise correct
> >>but more intuitive "/lib".
> >>There is software that’s getting confused by this mix-up.
> >If so, it's a bug in the software.  /usr/lib is a prefectly valid path.
> I don't know the details of that software and don't have the sources. But it
> needs to access the directory with the Windows API and somehow derives the
> Windows path back from /usr/lib which then doesn't work because /usr/lib
> doesn't exist for Windows while /lib does.

You don't have the sources?  Of a Cygwin application?  That's a problem
licensing-wise, and that makes me much less sympathetic.

And then again, if it's a Cygwin application, it has a bug, and the bug
should be fixed in that software, so you should file a bug with them.

OTOH, if it's, in fact, not a Cygwin application, then any changes to
cygwin_conv_path are moot.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Windows/Posix path conversion fails on extra mount points
  2015-02-10  9:25     ` Corinna Vinschen
@ 2015-02-10 19:11       ` Thomas Wolff
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Wolff @ 2015-02-10 19:11 UTC (permalink / raw)
  To: cygwin

Am 10.02.2015 um 10:25 schrieb Corinna Vinschen:
> On Feb  9 21:47, Thomas Wolff wrote:
>> Am 09.02.2015 um 10:18 schrieb Corinna Vinschen:
>>> On Feb  9 00:04, Thomas Wolff wrote:
>>>> cygwin_create_path (CCP_WIN_A_TO_POSIX, "C:/cygwin/lib") -> "/usr/lib"
>>>> This is the correct directory, however, only by means of the extra mount
>>>> point
>>>> of /usr/lib; I think the result should rather be the likewise correct
>>>> but more intuitive "/lib".
>>>> There is software that’s getting confused by this mix-up.
>>> If so, it's a bug in the software.  /usr/lib is a prefectly valid path.
> ...
> OTOH, if it's, in fact, not a Cygwin application, then any changes to
> cygwin_conv_path are moot.
I understand your reluctance; yet I think that from the two valid mappings
"C:/cygwin/lib" -> "/usr/lib"
"C:/cygwin/lib" -> "/lib"
the second one would be more logical.

------
Thomas

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
http://www.avast.com


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-10 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 23:04 Windows/Posix path conversion fails on extra mount points Thomas Wolff
2015-02-09  9:18 ` Corinna Vinschen
2015-02-09 20:47   ` Thomas Wolff
2015-02-10  9:25     ` Corinna Vinschen
2015-02-10 19:11       ` Thomas Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).