Hello everyone,

Renato: I realized that I can use forward slashes instead.

But the issue here is that I get the windows path from registry:
reg query " .... " -> returns c:\Windows\Adm

The best solution (I think) is something similar to cygpath,
because then you can convert from Windows to POSIX without the need to escape the backslash.


Keith: Yes, I agree with your tests. My tests are:

############## With backslash
1- MSDOS : OK -> results as expected

c:\users\k -> dir c:\windows -> list of files
c:\ -> dir c:\windows -> list of files
h:\ -> dir c:\windows -> list of files
h:\test -> dir c:\windows -> list of files

2- MINGW -> NO OK in my opinion. See test 4.1
c:\users\k -> ls c:\windows -> list of files  (It shouldn't, I'm not in the root of the drive)
c:\ -> ls c:\windows -> list of files
h:\ -> ls c:\windows -> list of files
h:\test -> ls c:\windows -> list of files

3- CYGWIN : OK in my opinion. -> always consistent.
c:\users\k -> ls c:\windows -> c:windows: No such file or directory
c:\ -> ls c:\windows -> c:windows: No such file or directory
h:\ -> ls c:\windows -> c:windows: No such file or directory
h:\test -> ls c:\windows -> c:windows: No such file or directory


########### Without backslash
4- MSDOS : 4.1 has no sense for me, but I agree with Earnie that it is a OS "feature".

4-1 c:\users\k -> dir c:windows -> no such file or directory
c:\ -> dir c:windows -> list of files
h:\ -> dir c:windows -> list of files
h:\test -> dir c:windows -> list of files

5- MINGW :
c:\users\k -> ls c:windows -> list of files -> no OK in my opinion , not the same result as 4.1
c:\ -> ls c:windows -> list of files
h:\ -> ls c:windows -> list of files
h:\test -> ls c:windows -> list of files

6- CYGWIN: OK in my opinion. -> always consistent.
c:\users\k -> ls c:windows -> c:windows: No such file or directory
c:\ -> ls c:windows -> c:windows: No such file or directory
h:\ -> ls c:windows -> c:windows: No such file or directory
h:\test -> ls c:windows -> c:windows: No such file or directory

What do you think?
Can you help me?

Thanks a lot.


2013/2/9 Earnie Boyd <earnie@users.sourceforge.net>
On Fri, Feb 8, 2013 at 4:39 PM, Keith Marshall wrote:
> On 08/02/13 19:18, Earnie Boyd wrote:
> [MSYS ls maps c:foo as c:/foo, regardless of current directory]
>> Yes, it is working properly.  Bash converts \p to p and c:programs
>> stats because of the way the OS handles it.
>
> I disagree.  This claim does not withstand scrutiny...
>
>    $ cd
>
>    $ cmd //c cd
>    C:\MinGW\msys\1.0\home\keith
>
>    $ cmd //c dir c:users
>     Volume in drive C has no label.
>     Volume Serial Number is 2038-1EBE
>
>     Directory of C:\MinGW\msys\1.0\home\keith
>
>    File Not Found
>
>    $ ls c:users
>    All Users  Default  Default User  Guest  Public  desktop.ini  keith
>
> IMO, this is not working correctly; the latter two commands *should*
> produce (effectively) the same result, i.e. if it does work the way the
> OS handles it, c:users should map to the *current* directory on drive
> c:, (not to the root of drive c:), yielding...
>
>    $ ls c:users
>    ls: c:users: No such file or directory

I later stated it was broken.  I'm guessing MSYS path translation is
somehow getting in the way but one needs to follow the MSYS debug
steps to find the issue.

However my statements for D:Path as it concerns the OS is correct, it
is a relative path to mean the CWD of the specified device.  MSYS
however is somehow modifying CWD without returning it to the previous
CWD.

BTW, you might want to use cmd.exe instead of cmd in your tests to
exclude the use of shell script.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe