This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problems with UNC filenames passed to bash when called from a windows shortcut
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 26 Jan 2012 16:04:03 +0100
- Subject: Re: Problems with UNC filenames passed to bash when called from a windows shortcut
- References: <CAB3JEf8sr0r1SXXdwU080vq6NxWf8EJyQvTuy_ToiN7oQ4_SCA@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
On Jan 24 11:10, john refling wrote:
> I have noticed that some filenames (with spaces) specified as UNC paths are
> not passed properly as positional parameters at the cygwin / windows
> interface.
>
>
> Specifically, I have an XP shortcut to cygwin bash placed in my XP SendTo
> folder. Bash calls another custom script called ARGTEST.sh. The names of
> files that were selected by the mouse before clicking the SendTo are tacked
> onto the end of the command line by the standard windows mechanism.
>
>
> These filenames ultimately become the positional parameters for the custom
> script, which simply prints them out. The shortcut is named ARGTEST.
>
>
> So the "target" for the XP shortcut ARGTEST is the following:
>
>
> %SYSTEMDRIVE%\cygwin\bin\bash.exe /ARGTEST.sh
>
>
> the script /ARGTEST.sh is nothing more than:
>
>
> #!/bin/sh
> export PATH=/bin
> for i in "${@}"; do
> echo "$i"
> done
> read -p "Press Enter..."
> exit
> [...]
> Running the same 2 examples above, but selecting files on a network share
> results in some wrong results:
>
>
> \\q04\place\mnt\mnt\how2bu.txt
> \\q04\place\mnt\mnt\Questionable
> \q04\place\mnt\mnt\Copy of how2bu.txt (WRONG!)
> \q04\place\mnt\mnt\tmp - must sort soon (WRONG!)
> \\q04\place\mnt\mnt\.master
Try setting the environment variable CYGWIN to "noglob" before calling
bash. Other than that, I'm looking if we can fix that for 1.7.10.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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