2013/2/11 Keith Marshall <keithmarshall@users.sourceforge.net>
The examples I've offered previously illustrate correct interpretation
of OS context, when processed by OS commands; they also illustrate that
MSYS commands, (well, "ls" anyway), seem to interpret "d:pathname" as if
it had been specified as "d:/pathname"; to me, (and you now appear to
agree), this seems like a bug in MSYS.  However, I see no evidence to
support the claim that "MSYS is somehow modifying CWD, and failing
to return to previous CWD".

We have at least four people confirming this behavior of ls (BGINFO for X, Earnie, you and me). I would just take a look at the source code of ls, but my guess is that ls is either appending a slash/backslash to the colon when effectively using the WinAPI to retrieve the content of the directory, or it is indeed changing the current working directory for the corresponding drive when listing the contents or when the program is started. Below are a few tests of mine though, they confirm the problem once more, and show that msls does not share the same problem.

/c/Users/Renato/Desktop $ cd ..
/c/Users/Renato $ ls c:Desktop => should work but doesn't
/c/Users/Renato $ cmd //c dir c:Desktop => works as expected
/c/Users/Renato $ msls c:Desktop => works as expected

2013/2/11 BGINFO for X <bginfo4x@kztsoftware.com>
1) But, we have found a bug (case 4.1) ? If yes, do I need to do something now? email to someone to communicate it?

I think it is rather the 5th item below, no? We have found a bug but it's not related to what you want. I think you just need a Windows-to-Unix path converter, right? I'd personally search for one, maybe write one myself, or just request it through the SourceForge bug tracker.

5- MINGW: c:\users\k -> ls c:windows -> list of files -> no OK in my opinion , not the same result as 4.1
2) I get this value from registry -> c:\Windows\Adam. Then I need to check if the folder exist. If the folder doesn't exist, then I can't "cd mypath && pwd -W" or "cd mypath && echo $PWD". So it is no possible to get the $PWD in forward slashes like c:/Windows/Adam.

I think you mean pwd without -W. I don't understand your question, but yes, pwd is no help if you can't cd to the directory. Just out of curiosity, what are you trying to achieve exactly? For example, is c:\Windows\Adam just an example or the real path that you need for some reason to convert to Unix style?