Mail Archives: cygwin/2010/08/17/04:55:32
On 17 Aug 2010 10:20:41 +0200, Corinna Vinschen wrote:
>On Aug 16 18:13, Andrew DeFaria wrote:
>> This is strange. I usually tend to use Cygwin's Perl as it is more
>> full featured and works well but there are times when I am forced to
>> use "cqperl" - a Perl that comes with Rational Clearquest - at my
>> clients. Here it seems that Cygwin's Perl utterly fails the test
>> where as cqperl - a derivative of ActiveuuState - works.
>>=20
>> This is using the existence check (-e) for a file. The file happens
>> to be on a share thus we are using UNC notation. It doesn't even
>> matter if "server" is a real server or not, nor whether the share
>> and path exist. Use anything you like. In fact use "server" and
>> "path" and "file". Either way Cygwin's Perl reports that the file
>> exists even when it doesn't, or the path is wrong or even if the
>> server does not exist!
>>=20
>> $ cat test.pl'
>> use warnings;
>> use strict;
>>=20
>> # Obviously non-existant server and file
>> my $file =3D "\\\\server\\path\\file";
>>=20
>> # Check for existance returns true for Cygwin - false for ActiveState
>> if (-e $file) {
>> print "true\n"
>> } else {
>> print "false\n"
>> }
>> $ perl test.pl
>> true
>> $ cqperl test.pl
>> false
>> $
>
>I can not reproduce your problem. I used "\\\\server\\path\\file"
>unchanged, as well as valid server and share names and just a
>non-existant file name. In both cases the script prints "false".
>And it prints "true" for an existing file, just as expected.
Hm, I can reproduce it and it's even simpler, no perl involved:
pc> [ -e //server/junk ] && date
Tue Aug 17 10:28:14 WEDT 2010
pc> ls -ls //server/junk
0 -rw-r--r-- 1 lemkemch Domain Users 0 Dec 1 2006 //server/junk
Here's no server called server.
pc> uname -a
CYGWIN_NT-5.1 p01080268 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin
pc> mount
C:/MyStuff/1.7cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/MyStuff/1.7cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/MyStuff/cygwin/home on /home type ntfs (text)
C:/MyStuff/1.7cygwin on / type ntfs (binary,auto)
U: on /u type ntfs (text)
C: on /c type ntfs (text,posix=3D0,user,noumount,auto)
I: on /i type vfat (text,posix=3D0,user,noumount,auto)
J: on /j type ntfs (text,posix=3D0,user,noumount,auto)
K: on /k type unknown (text,posix=3D0,user,noumount,auto)
Q: on /q type ntfs (text,posix=3D0,user,noumount,auto)
S: on /s type ntfs (text,posix=3D0,user,noumount,auto)
V: on /v type ntfs (text,posix=3D0,user,noumount,auto)=20
Michael
--
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
- Raw text -